bt: Add late bonding confirmation mechanism
If a coordinated set member is bonding late the user will be notified and asked for confirmation on pairing with this device. The dialog box will display specific message for this case. Bug: 282193044 Test: manual Tag: #feature Change-Id: Ie9d79282dd432a542ea02ef477019be6dfbce997
This commit is contained in:
@@ -72,6 +72,7 @@ public class BluetoothPairingController implements OnCheckedChangeListener,
|
||||
private boolean mIsCoordinatedSetMember;
|
||||
private boolean mIsLeAudio;
|
||||
private boolean mIsLeContactSharingEnabled;
|
||||
private boolean mIsLateBonding;
|
||||
|
||||
/**
|
||||
* Creates an instance of a BluetoothPairingController.
|
||||
@@ -98,6 +99,7 @@ public class BluetoothPairingController implements OnCheckedChangeListener,
|
||||
mDeviceName = mBluetoothManager.getCachedDeviceManager().getName(mDevice);
|
||||
mPbapClientProfile = mBluetoothManager.getProfileManager().getPbapClientProfile();
|
||||
mPasskeyFormatted = formatKey(mPasskey);
|
||||
mIsLateBonding = mBluetoothManager.getCachedDeviceManager().isLateBonding(mDevice);
|
||||
|
||||
final CachedBluetoothDevice cachedDevice =
|
||||
mBluetoothManager.getCachedDeviceManager().findDevice(mDevice);
|
||||
@@ -116,7 +118,10 @@ public class BluetoothPairingController implements OnCheckedChangeListener,
|
||||
|
||||
mIsLeContactSharingEnabled = DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_SETTINGS_UI,
|
||||
SettingsUIDeviceConfig.BT_LE_AUDIO_CONTACT_SHARING_ENABLED, true);
|
||||
Log.d(TAG, "BT_LE_AUDIO_CONTACT_SHARING_ENABLED is " + mIsLeContactSharingEnabled);
|
||||
Log.d(TAG,
|
||||
"BT_LE_AUDIO_CONTACT_SHARING_ENABLED is "
|
||||
+ mIsLeContactSharingEnabled + " isCooridnatedSetMember "
|
||||
+ mIsCoordinatedSetMember);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -192,6 +197,15 @@ public class BluetoothPairingController implements OnCheckedChangeListener,
|
||||
return mIsCoordinatedSetMember;
|
||||
}
|
||||
|
||||
/**
|
||||
* A method for querying if the bluetooth device from a coordinated set is bonding late.
|
||||
*
|
||||
* @return - A boolean indicating if the device is bonding late.
|
||||
*/
|
||||
public boolean isLateBonding() {
|
||||
return mIsLateBonding;
|
||||
}
|
||||
|
||||
/**
|
||||
* A method for querying if the bluetooth device has a profile already set up on this device.
|
||||
*
|
||||
|
Reference in New Issue
Block a user