null check in getOriginalPath
This commit is contained in:
parent
abdb8bfb65
commit
fb97f9d18f
|
@ -152,7 +152,6 @@ public class FileBackend {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getOriginalPath(Uri uri) {
|
public String getOriginalPath(Uri uri) {
|
||||||
Log.d(Config.LOGTAG,"get original path for uri: "+uri.toString());
|
|
||||||
return FileUtils.getPath(mXmppConnectionService,uri);
|
return FileUtils.getPath(mXmppConnectionService,uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,9 @@ public class FileUtils {
|
||||||
*/
|
*/
|
||||||
@SuppressLint("NewApi")
|
@SuppressLint("NewApi")
|
||||||
public static String getPath(final Context context, final Uri uri) {
|
public static String getPath(final Context context, final Uri uri) {
|
||||||
|
if (uri == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
final boolean isKitKat = Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT;
|
final boolean isKitKat = Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue