Loading packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java +1 −1 Original line number Diff line number Diff line Loading @@ -83,7 +83,7 @@ public class BluetoothUtils { private static final String KEY_HEARABLE_CONTROL_SLICE = "HEARABLE_CONTROL_SLICE_WITH_WIDTH"; private static final Set<Integer> SA_PROFILES = ImmutableSet.of( BluetoothProfile.A2DP, BluetoothProfile.LE_AUDIO, BluetoothProfile.HEARING_AID); BluetoothProfile.A2DP, BluetoothProfile.LE_AUDIO); private static final List<Integer> BLUETOOTH_DEVICE_CLASS_HEADSET = List.of( BluetoothClass.Device.AUDIO_VIDEO_HEADPHONES, Loading packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/BluetoothUtilsTest.java +0 −21 Original line number Diff line number Diff line Loading @@ -110,7 +110,6 @@ public class BluetoothUtilsTest { @Mock private PackageManager mPackageManager; @Mock private LeAudioProfile mA2dpProfile; @Mock private LeAudioProfile mLeAudioProfile; @Mock private LeAudioProfile mHearingAid; @Mock private LocalBluetoothLeBroadcast mBroadcast; @Mock private LocalBluetoothProfileManager mProfileManager; @Mock private LocalBluetoothManager mLocalBluetoothManager; Loading Loading @@ -158,7 +157,6 @@ public class BluetoothUtilsTest { when(mProfileManager.getLeAudioProfile()).thenReturn(mLeAudioProfile); when(mA2dpProfile.getProfileId()).thenReturn(BluetoothProfile.A2DP); when(mLeAudioProfile.getProfileId()).thenReturn(BluetoothProfile.LE_AUDIO); when(mHearingAid.getProfileId()).thenReturn(BluetoothProfile.HEARING_AID); when(mContext.getSystemService(InputManager.class)).thenReturn(mInputManager); when(mInputManager.getInputDeviceIds()).thenReturn(new int[]{TEST_DEVICE_ID}); when(mInputManager.getInputDeviceBluetoothAddress(TEST_DEVICE_ID)).thenReturn(TEST_ADDRESS); Loading Loading @@ -1228,25 +1226,6 @@ public class BluetoothUtilsTest { TEST_ADDRESS)); } @Test public void getAudioDeviceAttributesForSpatialAudio_hearingAid() { when(mCachedBluetoothDevice.getDevice()).thenReturn(mBluetoothDevice); when(mCachedBluetoothDevice.getAddress()).thenReturn(TEST_ADDRESS); when(mCachedBluetoothDevice.getProfiles()).thenReturn(List.of(mHearingAid)); when(mHearingAid.isEnabled(mBluetoothDevice)).thenReturn(true); AudioDeviceAttributes attr = BluetoothUtils.getAudioDeviceAttributesForSpatialAudio( mCachedBluetoothDevice, AudioManager.AUDIO_DEVICE_CATEGORY_HEARING_AID); assertThat(attr) .isEqualTo( new AudioDeviceAttributes( AudioDeviceAttributes.ROLE_OUTPUT, AudioDeviceInfo.TYPE_HEARING_AID, TEST_ADDRESS)); } @Test public void isAudioSharingEnabled_flagOff_returnsFalse() { mSetFlagsRule.disableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING); Loading Loading
packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java +1 −1 Original line number Diff line number Diff line Loading @@ -83,7 +83,7 @@ public class BluetoothUtils { private static final String KEY_HEARABLE_CONTROL_SLICE = "HEARABLE_CONTROL_SLICE_WITH_WIDTH"; private static final Set<Integer> SA_PROFILES = ImmutableSet.of( BluetoothProfile.A2DP, BluetoothProfile.LE_AUDIO, BluetoothProfile.HEARING_AID); BluetoothProfile.A2DP, BluetoothProfile.LE_AUDIO); private static final List<Integer> BLUETOOTH_DEVICE_CLASS_HEADSET = List.of( BluetoothClass.Device.AUDIO_VIDEO_HEADPHONES, Loading
packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/BluetoothUtilsTest.java +0 −21 Original line number Diff line number Diff line Loading @@ -110,7 +110,6 @@ public class BluetoothUtilsTest { @Mock private PackageManager mPackageManager; @Mock private LeAudioProfile mA2dpProfile; @Mock private LeAudioProfile mLeAudioProfile; @Mock private LeAudioProfile mHearingAid; @Mock private LocalBluetoothLeBroadcast mBroadcast; @Mock private LocalBluetoothProfileManager mProfileManager; @Mock private LocalBluetoothManager mLocalBluetoothManager; Loading Loading @@ -158,7 +157,6 @@ public class BluetoothUtilsTest { when(mProfileManager.getLeAudioProfile()).thenReturn(mLeAudioProfile); when(mA2dpProfile.getProfileId()).thenReturn(BluetoothProfile.A2DP); when(mLeAudioProfile.getProfileId()).thenReturn(BluetoothProfile.LE_AUDIO); when(mHearingAid.getProfileId()).thenReturn(BluetoothProfile.HEARING_AID); when(mContext.getSystemService(InputManager.class)).thenReturn(mInputManager); when(mInputManager.getInputDeviceIds()).thenReturn(new int[]{TEST_DEVICE_ID}); when(mInputManager.getInputDeviceBluetoothAddress(TEST_DEVICE_ID)).thenReturn(TEST_ADDRESS); Loading Loading @@ -1228,25 +1226,6 @@ public class BluetoothUtilsTest { TEST_ADDRESS)); } @Test public void getAudioDeviceAttributesForSpatialAudio_hearingAid() { when(mCachedBluetoothDevice.getDevice()).thenReturn(mBluetoothDevice); when(mCachedBluetoothDevice.getAddress()).thenReturn(TEST_ADDRESS); when(mCachedBluetoothDevice.getProfiles()).thenReturn(List.of(mHearingAid)); when(mHearingAid.isEnabled(mBluetoothDevice)).thenReturn(true); AudioDeviceAttributes attr = BluetoothUtils.getAudioDeviceAttributesForSpatialAudio( mCachedBluetoothDevice, AudioManager.AUDIO_DEVICE_CATEGORY_HEARING_AID); assertThat(attr) .isEqualTo( new AudioDeviceAttributes( AudioDeviceAttributes.ROLE_OUTPUT, AudioDeviceInfo.TYPE_HEARING_AID, TEST_ADDRESS)); } @Test public void isAudioSharingEnabled_flagOff_returnsFalse() { mSetFlagsRule.disableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING); Loading