Merge "Remove CSIP/VCP enable/disable from Setting" into udc-dev am: d55e645795

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23065696

Change-Id: Ib7e054b0f9bb497d227d32d9a8fbbd4acb7003a4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Jack He
2023-05-09 06:20:49 +00:00
committed by Automerger Merge Worker

View File

@@ -327,7 +327,7 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll
} }
/** /**
* Disable the Le Audio profile, VCP, and CSIP for each of the Le Audio devices. * Disable the Le Audio profile for each of the Le Audio devices.
* *
* @param profile the LeAudio profile * @param profile the LeAudio profile
*/ */
@@ -336,20 +336,12 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll
Log.e(TAG, "There is no the LE profile or no device in mProfileDeviceMap. Do nothing."); Log.e(TAG, "There is no the LE profile or no device in mProfileDeviceMap. Do nothing.");
return; return;
} }
LocalBluetoothProfile vcp = mProfileManager.getVolumeControlProfile();
LocalBluetoothProfile csip = mProfileManager.getCsipSetCoordinatorProfile();
for (CachedBluetoothDevice leAudioDevice : mProfileDeviceMap.get(profile.toString())) { for (CachedBluetoothDevice leAudioDevice : mProfileDeviceMap.get(profile.toString())) {
Log.d(TAG, Log.d(TAG,
"device:" + leAudioDevice.getDevice().getAnonymizedAddress() "device:" + leAudioDevice.getDevice().getAnonymizedAddress()
+ "disable LE profile"); + "disable LE profile");
profile.setEnabled(leAudioDevice.getDevice(), false); profile.setEnabled(leAudioDevice.getDevice(), false);
if (vcp != null) {
vcp.setEnabled(leAudioDevice.getDevice(), false);
}
if (csip != null) {
csip.setEnabled(leAudioDevice.getDevice(), false);
}
} }
if (!SystemProperties.getBoolean(ENABLE_DUAL_MODE_AUDIO, false)) { if (!SystemProperties.getBoolean(ENABLE_DUAL_MODE_AUDIO, false)) {
@@ -360,7 +352,7 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll
} }
/** /**
* Enable the Le Audio profile, VCP, and CSIP for each of the Le Audio devices. * Enable the Le Audio profile for each of the Le Audio devices.
* *
* @param profile the LeAudio profile * @param profile the LeAudio profile
*/ */
@@ -376,19 +368,11 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll
disableProfileBeforeUserEnablesLeAudio(mProfileManager.getHeadsetProfile()); disableProfileBeforeUserEnablesLeAudio(mProfileManager.getHeadsetProfile());
} }
LocalBluetoothProfile vcp = mProfileManager.getVolumeControlProfile();
LocalBluetoothProfile csip = mProfileManager.getCsipSetCoordinatorProfile();
for (CachedBluetoothDevice leAudioDevice : mProfileDeviceMap.get(profile.toString())) { for (CachedBluetoothDevice leAudioDevice : mProfileDeviceMap.get(profile.toString())) {
Log.d(TAG, Log.d(TAG,
"device:" + leAudioDevice.getDevice().getAnonymizedAddress() "device:" + leAudioDevice.getDevice().getAnonymizedAddress()
+ "enable LE profile"); + "enable LE profile");
profile.setEnabled(leAudioDevice.getDevice(), true); profile.setEnabled(leAudioDevice.getDevice(), true);
if (vcp != null) {
vcp.setEnabled(leAudioDevice.getDevice(), true);
}
if (csip != null) {
csip.setEnabled(leAudioDevice.getDevice(), true);
}
} }
} }