diff options
Diffstat (limited to 'src/com/android/nfc/handover/BluetoothOppHandover.java')
-rw-r--r-- | src/com/android/nfc/handover/BluetoothOppHandover.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/nfc/handover/BluetoothOppHandover.java b/src/com/android/nfc/handover/BluetoothOppHandover.java index 325691d..1835aa8 100644 --- a/src/com/android/nfc/handover/BluetoothOppHandover.java +++ b/src/com/android/nfc/handover/BluetoothOppHandover.java @@ -60,7 +60,9 @@ public class BluetoothOppHandover implements Handler.Callback { mState = STATE_INIT; } - public static String getMimeTypeForUri(Context context, Uri uri) { + public static String getMimeTypeForUri(Context context, Uri uri) { + if (uri.getScheme() == null) return null; + if (uri.getScheme().equals(ContentResolver.SCHEME_CONTENT)) { ContentResolver cr = context.getContentResolver(); return cr.getType(uri); |