mirror of
https://github.com/oxen-io/session-android.git
synced 2025-04-05 05:15:37 +00:00
Merge pull request #2339 from mcginty/content-security-exception
catch content security exception
This commit is contained in:
commit
18961e6369
@ -39,11 +39,15 @@ public class PartAuthority {
|
|||||||
PartDatabase partDatabase = DatabaseFactory.getPartDatabase(context);
|
PartDatabase partDatabase = DatabaseFactory.getPartDatabase(context);
|
||||||
int match = uriMatcher.match(uri);
|
int match = uriMatcher.match(uri);
|
||||||
|
|
||||||
|
try {
|
||||||
switch (match) {
|
switch (match) {
|
||||||
case PART_ROW: return partDatabase.getPartStream(masterSecret, ContentUris.parseId(uri));
|
case PART_ROW: return partDatabase.getPartStream(masterSecret, ContentUris.parseId(uri));
|
||||||
case THUMB_ROW: return partDatabase.getThumbnailStream(masterSecret, ContentUris.parseId(uri));
|
case THUMB_ROW: return partDatabase.getThumbnailStream(masterSecret, ContentUris.parseId(uri));
|
||||||
default: return context.getContentResolver().openInputStream(uri);
|
default: return context.getContentResolver().openInputStream(uri);
|
||||||
}
|
}
|
||||||
|
} catch (SecurityException se) {
|
||||||
|
throw new IOException(se);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Uri getPublicPartUri(Uri uri) {
|
public static Uri getPublicPartUri(Uri uri) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user