Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ff985c6b authored by Hemant Gupta's avatar Hemant Gupta Committed by android-build-merger
Browse files

Merge "Bluetooth: PBAP not disconnected on disabling contact sharing"

am: 84bb2293

Change-Id: Ief10c8b5b3cdae90ba37a6349528f85e59562dc9
parents 0173130d 84bb2293
Loading
Loading
Loading
Loading
+2 −5
Original line number Original line Diff line number Diff line
@@ -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);
        }
        }
    }
    }