diff options
author | Juffin Alex Varghese <jalex@codeaurora.org> | 2014-09-05 17:45:25 +0530 |
---|---|---|
committer | Roman Birg <roman@cyngn.com> | 2016-06-10 16:25:01 -0700 |
commit | acfd7c325e23dfae2fab7006dc8f620f1401ea93 (patch) | |
tree | a6f73588c5c443ef0110ca641af8cc29313d92d9 | |
parent | cf5fdf71346d780e998c0fd1f8335517528695db (diff) | |
download | android_packages_apps_Bluetooth-acfd7c325e23dfae2fab7006dc8f620f1401ea93.tar.gz android_packages_apps_Bluetooth-acfd7c325e23dfae2fab7006dc8f620f1401ea93.tar.bz2 android_packages_apps_Bluetooth-acfd7c325e23dfae2fab7006dc8f620f1401ea93.zip |
Bluetooth-OPP: Check URI of sending files before entry cleanup
Checking the URI of sending files before removing the file entry
from Hashmap. Otherwise, during BT ON/OFF scenario there is a
possibility of URI becoming NULL that will lead to BT app crash.
CRs-Fixed: 721360
Change-Id: Ic7e8966d38e30948228e14a740cd3051b345da31
-rw-r--r-- | src/com/android/bluetooth/opp/BluetoothOppManager.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/com/android/bluetooth/opp/BluetoothOppManager.java b/src/com/android/bluetooth/opp/BluetoothOppManager.java index ebbbfc8a1..59ecf3599 100644 --- a/src/com/android/bluetooth/opp/BluetoothOppManager.java +++ b/src/com/android/bluetooth/opp/BluetoothOppManager.java @@ -278,14 +278,13 @@ public class BluetoothOppManager { public void cleanUpSendingFileInfo() { synchronized (BluetoothOppManager.this) { Uri uri; - if (V) Log.v(TAG, "cleanUpSendingFileInfo: mMultipleFlag = " + - mMultipleFlag); - if (!mMultipleFlag) { + if (V) Log.v(TAG, "cleanUpSendingFileInfo: mMultipleFlag = " + mMultipleFlag); + if (!mMultipleFlag && (mUriOfSendingFile != null)) { uri = Uri.parse(mUriOfSendingFile); if (V) Log.v(TAG, "cleanUpSendingFileInfo: " + "closeSendFileInfo for uri = " + uri); BluetoothOppUtility.closeSendFileInfo(uri); - } else { + } else if (mUrisOfSendingFiles != null) { for (int i = 0, count = mUrisOfSendingFiles.size(); i < count; i++) { uri = mUrisOfSendingFiles.get(i); if (V) Log.v(TAG, "cleanUpSendingFileInfo: " + |