Loading src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java +2 −5 Original line number Original line Diff line number Diff line Loading @@ -149,15 +149,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); } } } } Loading Loading
src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java +2 −5 Original line number Original line Diff line number Diff line Loading @@ -149,15 +149,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); } } } } Loading