Bug:
72872376
Test: manual
Change-Id: I9617e3c10bf19e22f9a8f172332a83bbbebaf4a4
private int mPasskey;
private String mDeviceName;
private LocalBluetoothProfile mPbapClientProfile;
private int mPasskey;
private String mDeviceName;
private LocalBluetoothProfile mPbapClientProfile;
+ private boolean mPbapAllowed;
/**
* Creates an instance of a BluetoothPairingController.
/**
* Creates an instance of a BluetoothPairingController.
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if (isChecked) {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if (isChecked) {
- mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_ALLOWED);
- mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_REJECTED);
}
}
@Override
public void onDialogPositiveClick(BluetoothPairingDialogFragment dialog) {
if (getDialogType() == USER_ENTRY_DIALOG) {
}
}
@Override
public void onDialogPositiveClick(BluetoothPairingDialogFragment dialog) {
if (getDialogType() == USER_ENTRY_DIALOG) {
+ if (mPbapAllowed) {
+ mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_ALLOWED);
+ } else {
+ mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_REJECTED);
+ }
onPair(mUserInput);
} else {
onPair(null);
onPair(mUserInput);
} else {
onPair(null);
@Override
public void onDialogNegativeClick(BluetoothPairingDialogFragment dialog) {
@Override
public void onDialogNegativeClick(BluetoothPairingDialogFragment dialog) {
+ mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_REJECTED);