Reset the priority on unbond
Change-Id: I67b68bd70b947177218e0b908b79ebb9de9f45a8
This commit is contained in:
committed by
Matthew Xie
parent
b45e3c8fe9
commit
c70f548355
@@ -514,8 +514,16 @@ final class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> {
|
||||
dispatchAttributesChanged();
|
||||
}
|
||||
|
||||
// Clear service priority of Hid, A2DP and Headset profiles on unbond
|
||||
private void clearProfilePriorities() {
|
||||
for (LocalBluetoothProfile profile : mProfiles) {
|
||||
profile.setUnbonded(mDevice);
|
||||
}
|
||||
}
|
||||
|
||||
void onBondingStateChanged(int bondState) {
|
||||
if (bondState == BluetoothDevice.BOND_NONE) {
|
||||
clearProfilePriorities();
|
||||
mProfiles.clear();
|
||||
mConnectAfterPairing = false; // cancel auto-connect
|
||||
setPhonebookPermissionChoice(PHONEBOOK_ACCESS_UNKNOWN);
|
||||
|
||||
Reference in New Issue
Block a user