Skip to content

Commit 752942e

Browse files
Jean-Baptiste QueruAndroid Code Review
authored andcommitted
Merge "The phone is crashing when unknown mime content is transferred."
2 parents 949fc0e + 145e6c4 commit 752942e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/java/android/content/ContentResolver.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ public final String getType(Uri url) {
201201
} catch (RemoteException e) {
202202
return null;
203203
} catch (java.lang.Exception e) {
204+
Log.w(TAG, "Failed to get type for: " + url + " (" + e.getMessage() + ")");
204205
return null;
205206
} finally {
206207
releaseProvider(provider);
@@ -216,6 +217,9 @@ public final String getType(Uri url) {
216217
return type;
217218
} catch (RemoteException e) {
218219
return null;
220+
} catch (java.lang.Exception e) {
221+
Log.w(TAG, "Failed to get type for: " + url + " (" + e.getMessage() + ")");
222+
return null;
219223
}
220224
}
221225

0 commit comments

Comments
 (0)