Fixed a NPE
Bluetooth share was crashing due to NPE. Included a check for
Inputstream in BluetoothOppSendFileInfo.
bug #7924487
Change-Id: Iccceb607a46962f84538e912d62f407ad5ee2f21
diff --git a/src/com/android/bluetooth/opp/BluetoothOppUtility.java b/src/com/android/bluetooth/opp/BluetoothOppUtility.java
index a3befb9..24b7606 100644
--- a/src/com/android/bluetooth/opp/BluetoothOppUtility.java
+++ b/src/com/android/bluetooth/opp/BluetoothOppUtility.java
@@ -322,7 +322,7 @@
static void closeSendFileInfo(Uri uri) {
if (D) Log.d(TAG, "closeSendFileInfo: uri=" + uri);
BluetoothOppSendFileInfo info = sSendFileMap.remove(uri);
- if (info != null) {
+ if (info != null && info.mInputStream != null) {
try {
info.mInputStream.close();
} catch (IOException ignored) {