Fix the logic error on PBAP permission assignment
-add test case Bug: 114808220 Test: make -j42 RunSettingsRoboTests Change-Id: Id77ade12c28e31a21c1c7a5dcb28906112d3465b
This commit is contained in:
@@ -54,8 +54,7 @@ public class BluetoothPairingController implements OnCheckedChangeListener,
|
||||
|
||||
// Bluetooth dependencies for the connection we are trying to establish
|
||||
private LocalBluetoothManager mBluetoothManager;
|
||||
@VisibleForTesting
|
||||
BluetoothDevice mDevice;
|
||||
private BluetoothDevice mDevice;
|
||||
@VisibleForTesting
|
||||
int mType;
|
||||
private String mUserInput;
|
||||
@@ -189,16 +188,16 @@ public class BluetoothPairingController implements OnCheckedChangeListener,
|
||||
*
|
||||
*/
|
||||
public void setContactSharingState() {
|
||||
if ((mDevice.getPhonebookAccessPermission() != BluetoothDevice.ACCESS_ALLOWED)
|
||||
&& (mDevice.getPhonebookAccessPermission() != BluetoothDevice.ACCESS_REJECTED)) {
|
||||
if (mDevice.getBluetoothClass().getDeviceClass()
|
||||
== BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE) {
|
||||
onCheckedChanged(null, true);
|
||||
} else {
|
||||
onCheckedChanged(null, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
final int permission = mDevice.getPhonebookAccessPermission();
|
||||
if (permission == BluetoothDevice.ACCESS_ALLOWED
|
||||
|| (permission == BluetoothDevice.ACCESS_UNKNOWN && mDevice.getBluetoothClass().
|
||||
getDeviceClass() == BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE)) {
|
||||
onCheckedChanged(null, true);
|
||||
} else {
|
||||
onCheckedChanged(null, false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* A method for querying if the provided editable is a valid passkey/pin format for this device.
|
||||
|
Reference in New Issue
Block a user