Remove DEVICE_OUT_ALL_SCO.

Due to the refactor of audio device type, DEVICE_OUT_ALL_SCO has been
removed. Use DEVICE_OUT_BLUETOOTH_SCO_HEADSET for the test instead.

Bug: 135621476
Test: make RunSettingsRoboTests ROBOTEST_FILTER="AudioOutputSwitchPreferenceControllerTest"
Change-Id: Ib32f4c313c5d318b6f99e1f0591c98c4c7c82ade
This commit is contained in:
jiabin
2019-11-15 09:55:04 -08:00
parent cdf01bb144
commit a30a209841

View File

@@ -16,7 +16,6 @@
package com.android.settings.sound;
import static android.media.AudioSystem.DEVICE_OUT_ALL_SCO;
import static android.media.AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_HEADSET;
import static android.media.AudioSystem.STREAM_MUSIC;
@@ -45,7 +44,6 @@ import androidx.preference.ListPreference;
import androidx.preference.PreferenceManager;
import androidx.preference.PreferenceScreen;
import com.android.settings.R;
import com.android.settings.bluetooth.Utils;
import com.android.settings.core.FeatureFlags;
import com.android.settings.testutils.shadow.ShadowAudioManager;
@@ -66,7 +64,6 @@ import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.Shadows;
import org.robolectric.annotation.Config;
import org.robolectric.shadow.api.Shadow;
import org.robolectric.shadows.ShadowBluetoothDevice;
@@ -246,7 +243,8 @@ public class AudioOutputSwitchPreferenceControllerTest {
public void isStreamFromOutputDevice_outputDeviceIsBtScoHeadset_shouldReturnTrue() {
mShadowAudioManager.setOutputDevice(DEVICE_OUT_BLUETOOTH_SCO_HEADSET);
assertThat(mController.isStreamFromOutputDevice(STREAM_MUSIC, DEVICE_OUT_ALL_SCO)).isTrue();
assertThat(mController.isStreamFromOutputDevice(
STREAM_MUSIC, DEVICE_OUT_BLUETOOTH_SCO_HEADSET)).isTrue();
}
/**
@@ -407,4 +405,4 @@ public class AudioOutputSwitchPreferenceControllerTest {
return TEST_KEY;
}
}
}
}