Remove availability tests from RingVolumePreferenceControllerTest
Controller is always UNSUPPORTED_ON_DEVICE. Test: atest com.android.settings.notification.RingVolumePreferenceControllerTest Bug: 300157932 Bug: 302295368 Change-Id: I9f0a453d2966e68e34e381ed1b1a0a01e1e65e23
This commit is contained in:
@@ -91,26 +91,6 @@ public class RingVolumePreferenceControllerTest {
|
|||||||
assertThat(mController.isAvailable()).isFalse();
|
assertThat(mController.isAvailable()).isFalse();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Devices that are not voice capable should still show Ring volume, because it is used by apps
|
|
||||||
* that make calls outside the cell network.
|
|
||||||
*/
|
|
||||||
@Test
|
|
||||||
public void isAvailable_notSingleVolume_notVoiceCapable_shouldReturnTrue() {
|
|
||||||
when(mHelper.isSingleVolume()).thenReturn(false);
|
|
||||||
when(mTelephonyManager.isVoiceCapable()).thenReturn(false);
|
|
||||||
|
|
||||||
assertThat(mController.isAvailable()).isTrue();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void isAvailable_notSingleVolume_VoiceCapable_shouldReturnTrue() {
|
|
||||||
when(mHelper.isSingleVolume()).thenReturn(false);
|
|
||||||
when(mTelephonyManager.isVoiceCapable()).thenReturn(true);
|
|
||||||
|
|
||||||
assertThat(mController.isAvailable()).isTrue();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void getAudioStream_shouldReturnRing() {
|
public void getAudioStream_shouldReturnRing() {
|
||||||
assertThat(mController.getAudioStream()).isEqualTo(AudioManager.STREAM_RING);
|
assertThat(mController.getAudioStream()).isEqualTo(AudioManager.STREAM_RING);
|
||||||
|
Reference in New Issue
Block a user