Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bd6118ff authored by Sungsoo's avatar Sungsoo
Browse files

Set volume handling of the default route properly

The volume handling of the default route of the devices which use
fixed volume should be set PLAYBACK_VOLUME_FIXED instead of
PLAYBACK_VOLUME_VARIABLE.

Bug: 36492333
Test: passed CTS of MediaRouterTest
Change-Id: I4bc42063b71ae9087b36f1529b7689b96d9e53e7
parent 6099e75d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -141,6 +141,11 @@ public class MediaRouter {
            mDefaultAudioVideo.mNameResId = com.android.internal.R.string.default_audio_route_name;
            mDefaultAudioVideo.mSupportedTypes = ROUTE_TYPE_LIVE_AUDIO | ROUTE_TYPE_LIVE_VIDEO;
            mDefaultAudioVideo.updatePresentationDisplay();
            if (((AudioManager) appContext.getSystemService(Context.AUDIO_SERVICE))
                    .isVolumeFixed()) {
                mDefaultAudioVideo.mVolumeHandling = RouteInfo.PLAYBACK_VOLUME_FIXED;
            }

            addRouteStatic(mDefaultAudioVideo);

            // This will select the active wifi display route if there is one.