Merge "Bluetooth: PBAP not disconnected on disabling contact sharing" am: 84bb2293ae am: ff985c6bc7

am: 0c75671a5f

Change-Id: Icc7d90a0e440d3d8f462d61821c602b26f79dbb7
This commit is contained in:
Hemant Gupta
2018-08-17 13:41:13 -07:00
committed by android-build-merger

View File

@@ -149,15 +149,12 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll
*/
private void disableProfile(LocalBluetoothProfile profile, BluetoothDevice device,
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);
profile.setPreferred(device, false);
if (profile instanceof MapProfile) {
mCachedDevice.setMessagePermissionChoice(BluetoothDevice.ACCESS_REJECTED);
} else if (profile instanceof PbapServerProfile) {
mCachedDevice.setPhonebookPermissionChoice(CachedBluetoothDevice.ACCESS_REJECTED);
}
}