Commit 89734e19 authored by Marco Nelissen's avatar Marco Nelissen
Browse files

Throw correct exception for null path insert

insert should return IllegalArgumentException instead of NullPointerException

Bug: 31861145
Change-Id: I12005c9ca4ebd4ab35cebdc80352c1696f4e57d1
parent d89181d1
......@@ -3214,7 +3214,7 @@ public class MediaProvider extends ContentProvider {
format = MediaFile.getFormatCode(path, mimeType);
}
}
if (path.endsWith("/")) {
if (path != null && path.endsWith("/")) {
Log.e(TAG, "directory has trailing slash: " + path);
return 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment