Merge "Bluetooth: PBAP not disconnected on disabling contact sharing" am: 84bb2293ae
am: ff985c6bc7
Change-Id: I9c2c99a0f3999c550195b4ed7eed5a31caea9d2a
This commit is contained in:
@@ -148,15 +148,12 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll
|
|||||||
*/
|
*/
|
||||||
private void disableProfile(LocalBluetoothProfile profile, BluetoothDevice device,
|
private void disableProfile(LocalBluetoothProfile profile, BluetoothDevice device,
|
||||||
SwitchPreference profilePref) {
|
SwitchPreference profilePref) {
|
||||||
if (profile instanceof PbapServerProfile) {
|
|
||||||
mCachedDevice.setPhonebookPermissionChoice(CachedBluetoothDevice.ACCESS_REJECTED);
|
|
||||||
// We don't need to do the additional steps below for this profile.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
mCachedDevice.disconnect(profile);
|
mCachedDevice.disconnect(profile);
|
||||||
profile.setPreferred(device, false);
|
profile.setPreferred(device, false);
|
||||||
if (profile instanceof MapProfile) {
|
if (profile instanceof MapProfile) {
|
||||||
mCachedDevice.setMessagePermissionChoice(BluetoothDevice.ACCESS_REJECTED);
|
mCachedDevice.setMessagePermissionChoice(BluetoothDevice.ACCESS_REJECTED);
|
||||||
|
} else if (profile instanceof PbapServerProfile) {
|
||||||
|
mCachedDevice.setPhonebookPermissionChoice(CachedBluetoothDevice.ACCESS_REJECTED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user