Merge pull request #2339 from mcginty/content-security-exception

catch content security exception
This commit is contained in:
Moxie Marlinspike 2015-01-13 12:02:24 -08:00
commit 18961e6369

View File

@ -39,10 +39,14 @@ public class PartAuthority {
PartDatabase partDatabase = DatabaseFactory.getPartDatabase(context);
int match = uriMatcher.match(uri);
switch (match) {
try {
switch (match) {
case PART_ROW: return partDatabase.getPartStream(masterSecret, ContentUris.parseId(uri));
case THUMB_ROW: return partDatabase.getThumbnailStream(masterSecret, ContentUris.parseId(uri));
default: return context.getContentResolver().openInputStream(uri);
}
} catch (SecurityException se) {
throw new IOException(se);
}
}