Remove rolled out flag automatic_bt_device_type

This flag has been rolled out in 24Q3 and can be removed.

Test: atest BluetoothDetailsAudioDeviceTypeControllerTest
Bug: 302323921
Flag: EXEMPT removing com.android.media.automatic_bt_device_type
Change-Id: I9997ef60f195b36298c36078eadf6c0a82bc662d
This commit is contained in:
Vlad Popa
2025-02-05 16:04:50 -08:00
parent b5299b17d9
commit b136fcfe18
2 changed files with 9 additions and 38 deletions

View File

@@ -18,7 +18,6 @@ package com.android.settings.bluetooth;
import static android.bluetooth.BluetoothDevice.DEVICE_TYPE_LE;
import static android.media.AudioManager.AUDIO_DEVICE_CATEGORY_SPEAKER;
import static android.media.audio.Flags.automaticBtDeviceType;
import static com.google.common.truth.Truth.assertThat;
@@ -98,12 +97,7 @@ public class BluetoothDetailsAudioDeviceTypeControllerTest extends
@Test
public void createAudioDeviceTypePreference_btDeviceIsCategorized_checkSelection() {
int deviceType = AUDIO_DEVICE_CATEGORY_SPEAKER;
if (automaticBtDeviceType()) {
when(mAudioManager.getBluetoothAudioDeviceCategory(MAC_ADDRESS)).thenReturn(deviceType);
} else {
when(mAudioManager.getBluetoothAudioDeviceCategory_legacy(MAC_ADDRESS, /*isBle=*/
true)).thenReturn(deviceType);
}
when(mAudioManager.getBluetoothAudioDeviceCategory(MAC_ADDRESS)).thenReturn(deviceType);
mController.createAudioDeviceTypePreference(mContext);
mAudioDeviceTypePref = mController.getAudioDeviceTypePreference();
@@ -118,12 +112,7 @@ public class BluetoothDetailsAudioDeviceTypeControllerTest extends
mController.onPreferenceChange(mAudioDeviceTypePref, Integer.toString(deviceType));
if (automaticBtDeviceType()) {
verify(mAudioManager).setBluetoothAudioDeviceCategory(eq(MAC_ADDRESS),
eq(AUDIO_DEVICE_CATEGORY_SPEAKER));
} else {
verify(mAudioManager).setBluetoothAudioDeviceCategory_legacy(eq(MAC_ADDRESS), eq(true),
eq(AUDIO_DEVICE_CATEGORY_SPEAKER));
}
verify(mAudioManager).setBluetoothAudioDeviceCategory(eq(MAC_ADDRESS),
eq(AUDIO_DEVICE_CATEGORY_SPEAKER));
}
}