summaryrefslogtreecommitdiffstats
path: root/packages/SettingsLib/src
diff options
context:
space:
mode:
authorSanket Padawe <sanketpadawe@google.com>2015-07-07 14:12:15 -0700
committerAndre Eisenbach <eisenbach@google.com>2015-07-09 01:02:03 +0000
commit4d08a485db5021638b0abcb8675ba00579bd7fcc (patch)
tree43958aa30a3f10576babb9e9f4e25dc68d557979 /packages/SettingsLib/src
parentde335a7dc4dcd6b1de8f4c455184f4c82d42612d (diff)
downloadframeworks_base-4d08a485db5021638b0abcb8675ba00579bd7fcc.zip
frameworks_base-4d08a485db5021638b0abcb8675ba00579bd7fcc.tar.gz
frameworks_base-4d08a485db5021638b0abcb8675ba00579bd7fcc.tar.bz2
Add Null checks while processing pairing cancel intent
Use case: Exception while handling pairing cancel Intent received 1. Initiate pairing from DUT to remote 2. Power off DUT after getting pairing popup Root Cause:Crash observed in settings application Change-Id: Ia05fe196ecf6a1d4ec26f85b0cf984e23089c728 Fix: Fixed by adding Null check in PairingCancelHandler
Diffstat (limited to 'packages/SettingsLib/src')
-rwxr-xr-xpackages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java
index bf92fda..4bcbea7 100755
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java
@@ -355,7 +355,9 @@ public final class BluetoothEventManager {
return;
}
int errorMsg = R.string.bluetooth_pairing_error_message;
- Utils.showError(context, cachedDevice.getName(), errorMsg);
+ if (context != null && cachedDevice != null) {
+ Utils.showError(context, cachedDevice.getName(), errorMsg);
+ }
}
}