Add the pairing string for CSIP supported device
Show the pairing dialog with the hint message that pairing this device will pair all of the set member of a coordinated set. If the device supports CSIP, the message will be shown. Screenshot: https://screenshot.googleplex.com/8WcrdgBoLRgJjHs Bug: 178981521 Test: make RunSettingsRoboTests ROBOTEST_FILTER=BlueotohPairingDialog Change-Id: I5432b7264652dd4485e2669f6004caa4f7459238 Merged-In: I5432b7264652dd4485e2669f6004caa4f7459238
This commit is contained in:
@@ -28,6 +28,7 @@ import androidx.annotation.VisibleForTesting;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.bluetooth.BluetoothPairingDialogFragment.BluetoothPairingDialogListener;
|
||||
import com.android.settingslib.bluetooth.CachedBluetoothDevice;
|
||||
import com.android.settingslib.bluetooth.LocalBluetoothManager;
|
||||
import com.android.settingslib.bluetooth.LocalBluetoothProfile;
|
||||
|
||||
@@ -64,6 +65,7 @@ public class BluetoothPairingController implements OnCheckedChangeListener,
|
||||
private String mDeviceName;
|
||||
private LocalBluetoothProfile mPbapClientProfile;
|
||||
private boolean mPbapAllowed;
|
||||
private boolean mIsCoordinatedSetMember;
|
||||
|
||||
/**
|
||||
* Creates an instance of a BluetoothPairingController.
|
||||
@@ -90,6 +92,10 @@ public class BluetoothPairingController implements OnCheckedChangeListener,
|
||||
mDeviceName = mBluetoothManager.getCachedDeviceManager().getName(mDevice);
|
||||
mPbapClientProfile = mBluetoothManager.getProfileManager().getPbapClientProfile();
|
||||
mPasskeyFormatted = formatKey(mPasskey);
|
||||
final CachedBluetoothDevice cachedDevice =
|
||||
mBluetoothManager.getCachedDeviceManager().findDevice(mDevice);
|
||||
mIsCoordinatedSetMember = (cachedDevice != null)
|
||||
? cachedDevice.isCoordinatedSetMemberDevice() : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -155,6 +161,15 @@ public class BluetoothPairingController implements OnCheckedChangeListener,
|
||||
return mDeviceName;
|
||||
}
|
||||
|
||||
/**
|
||||
* A method for querying if the bluetooth device is a LE coordinated set member device.
|
||||
*
|
||||
* @return - A boolean indicating if the device is a CSIP supported device.
|
||||
*/
|
||||
public boolean isCoordinatedSetMemberDevice() {
|
||||
return mIsCoordinatedSetMember;
|
||||
}
|
||||
|
||||
/**
|
||||
* A method for querying if the bluetooth device has a profile already set up on this device.
|
||||
*
|
||||
|
Reference in New Issue
Block a user