Identify cast mode properly in audio switch
- Use STREAM_MUSIC to idetify cast mode - Use STREAM_MUSIC to detect wired headset Bug: 78141750 Test: make RunSettingsRoboTests ROBOTEST_FILTER="MediaOutputPreferenceControllerTest" -j40 Change-Id: I92273d41d3debfc3d6327c4ca09143a2dd9b1cb6
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package com.android.settings.sound;
|
||||
|
||||
|
||||
import static android.media.AudioSystem.DEVICE_OUT_REMOTE_SUBMIX;
|
||||
import static android.media.AudioSystem.DEVICE_OUT_USB_HEADSET;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
@@ -198,7 +199,7 @@ public class MediaOutputPreferenceControllerTest {
|
||||
*/
|
||||
@Test
|
||||
public void updateState_mediaStreamIsCapturedByCast_shouldDisableAndSetDefaultSummary() {
|
||||
mShadowAudioManager.setMusicActiveRemotely(true);
|
||||
mShadowAudioManager.setStream(DEVICE_OUT_REMOTE_SUBMIX);
|
||||
|
||||
mController.updateState(mPreference);
|
||||
|
||||
|
Reference in New Issue
Block a user