Loading packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java +1 −1 Original line number Diff line number Diff line Loading @@ -251,7 +251,7 @@ public class A2dpProfile implements LocalBluetoothProfile { final BluetoothCodecConfig codecConfig = (selectable == null || selectable.length < 1) ? null : selectable[0]; final int codecType = (codecConfig == null || codecConfig.isMandatoryCodec()) final int codecType = (codecConfig == null) ? BluetoothCodecConfig.SOURCE_CODEC_TYPE_INVALID : codecConfig.getCodecType(); int index = -1; Loading packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/A2dpProfileTest.java +3 −1 Original line number Diff line number Diff line Loading @@ -189,7 +189,9 @@ public class A2dpProfileTest { when(status.getCodecsSelectableCapabilities()).thenReturn(configs); when(config.isMandatoryCodec()).thenReturn(true); assertThat(mProfile.getHighQualityAudioOptionLabel(mDevice)).isEqualTo(UNKNOWN_CODEC_LABEL); when(config.getCodecName()).thenReturn("SBC"); assertThat(mProfile.getHighQualityAudioOptionLabel(mDevice)).isEqualTo( String.format(KNOWN_CODEC_LABEL, config.getCodecName())); } @Test Loading Loading
packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java +1 −1 Original line number Diff line number Diff line Loading @@ -251,7 +251,7 @@ public class A2dpProfile implements LocalBluetoothProfile { final BluetoothCodecConfig codecConfig = (selectable == null || selectable.length < 1) ? null : selectable[0]; final int codecType = (codecConfig == null || codecConfig.isMandatoryCodec()) final int codecType = (codecConfig == null) ? BluetoothCodecConfig.SOURCE_CODEC_TYPE_INVALID : codecConfig.getCodecType(); int index = -1; Loading
packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/A2dpProfileTest.java +3 −1 Original line number Diff line number Diff line Loading @@ -189,7 +189,9 @@ public class A2dpProfileTest { when(status.getCodecsSelectableCapabilities()).thenReturn(configs); when(config.isMandatoryCodec()).thenReturn(true); assertThat(mProfile.getHighQualityAudioOptionLabel(mDevice)).isEqualTo(UNKNOWN_CODEC_LABEL); when(config.getCodecName()).thenReturn("SBC"); assertThat(mProfile.getHighQualityAudioOptionLabel(mDevice)).isEqualTo( String.format(KNOWN_CODEC_LABEL, config.getCodecName())); } @Test Loading