handle NullPointerException in cases where a proxy
call to AdapterService is called after Adapter Service is stopped. Change-Id: I009787f03f9a013b9b06fcb7e3f6241c850f8cd2
This commit is contained in:
committed by
Matthew Xie
parent
33806e25b1
commit
305f240dc1
@@ -786,6 +786,12 @@ public final class BluetoothDevice implements Parcelable {
|
||||
try {
|
||||
return sService.getBondState(this);
|
||||
} catch (RemoteException e) {Log.e(TAG, "", e);}
|
||||
catch (NullPointerException npe) {
|
||||
// Handle case where bluetooth service proxy
|
||||
// is already null.
|
||||
Log.e(TAG, "NullPointerException for getBondState() of device ("+
|
||||
getAddress()+")", npe);
|
||||
}
|
||||
return BOND_NONE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user