Skip to content

Commit ab455da

Browse files
Matthew XieAndroid (Google) Code Review
authored andcommitted
Merge "handle NullPointerException in cases where a proxy call to AdapterService is called after Adapter Service is stopped." into jb-mr1-dev
2 parents 0590c1b + 305f240 commit ab455da

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

core/java/android/bluetooth/BluetoothDevice.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,12 @@ public int getBondState() {
786786
try {
787787
return sService.getBondState(this);
788788
} catch (RemoteException e) {Log.e(TAG, "", e);}
789+
catch (NullPointerException npe) {
790+
// Handle case where bluetooth service proxy
791+
// is already null.
792+
Log.e(TAG, "NullPointerException for getBondState() of device ("+
793+
getAddress()+")", npe);
794+
}
789795
return BOND_NONE;
790796
}
791797

0 commit comments

Comments
 (0)