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
This commit is contained in:
Sanket Padawe
2015-07-07 14:12:15 -07:00
committed by Andre Eisenbach
parent de335a7dc4
commit 4d08a485db

View File

@@ -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);
}
}
}