Bluetooth: PBAP not disconnected on disabling contact sharing
Precondition: Contact Sharing is checked and there is PBAP Connection. Usecase: 1) Establish PBAP Connection. 2) Disable "Contact Sharing" button. 3) Check if PBAP is Disconnected or not. Issue: PBAP Profile Disconnection is not triggered. Root Cause: Change in Setting menu UI by removal of "Disable Profile" dialog box (like Android O) has resulted in not invoking PBAP Disconnect call from Setting App. Fix: Handle Disconnection for PBAP from API disableProfile() at settings/bluetooth/BluetoothDetailsProfilesController.java like other profiles. Test: Issue is not seen as per above usecase. Bug: 110515410 Change-Id: Ibd18fb836e10e79e99e6b04127ae181134201cef
This commit is contained in:
@@ -148,15 +148,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user