null check in getOriginalPath

This commit is contained in:
Daniel Gultsch 2016-01-04 20:14:08 +01:00
parent abdb8bfb65
commit fb97f9d18f
2 changed files with 3 additions and 1 deletions

View File

@ -152,7 +152,6 @@ public class FileBackend {
}
public String getOriginalPath(Uri uri) {
Log.d(Config.LOGTAG,"get original path for uri: "+uri.toString());
return FileUtils.getPath(mXmppConnectionService,uri);
}

View File

@ -23,6 +23,9 @@ public class FileUtils {
*/
@SuppressLint("NewApi")
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;