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

Commit 94e8e810 authored by Hyundo Moon's avatar Hyundo Moon
Browse files

Remove hidden RemoteControlClient constant usages in MediaRouter

Bug: 161331794
Test: Ran MediaRouterTest (CTS)
Change-Id: I116946d3940d6f39ca61edf1c0c0e237115650d4
parent 1a364965
Loading
Loading
Loading
Loading
+21 −6
Original line number Diff line number Diff line
@@ -1616,9 +1616,9 @@ public class MediaRouter {
        Drawable mIcon;
        // playback information
        int mPlaybackType = PLAYBACK_TYPE_LOCAL;
        int mVolumeMax = RemoteControlClient.DEFAULT_PLAYBACK_VOLUME;
        int mVolume = RemoteControlClient.DEFAULT_PLAYBACK_VOLUME;
        int mVolumeHandling = RemoteControlClient.DEFAULT_PLAYBACK_VOLUME_HANDLING;
        int mVolumeMax = DEFAULT_PLAYBACK_MAX_VOLUME;
        int mVolume = DEFAULT_PLAYBACK_VOLUME;
        int mVolumeHandling = PLAYBACK_VOLUME_VARIABLE;
        int mPlaybackStream = AudioManager.STREAM_MUSIC;
        VolumeCallbackInfo mVcb;
        Display mPresentationDisplay;
@@ -1722,6 +1722,21 @@ public class MediaRouter {
         */
        public final static int PLAYBACK_VOLUME_VARIABLE = 1;

        /**
         * Default playback max volume if not set.
         * Hard-coded to the same number of steps as AudioService.MAX_STREAM_VOLUME[STREAM_MUSIC]
         *
         * @see #getVolumeMax()
         */
        private static final int DEFAULT_PLAYBACK_MAX_VOLUME = 15;

        /**
         * Default playback volume if not set.
         *
         * @see #getVolume()
         */
        private static final int DEFAULT_PLAYBACK_VOLUME = DEFAULT_PLAYBACK_MAX_VOLUME;

        RouteInfo(RouteCategory category) {
            mCategory = category;
            mDeviceType = DEVICE_TYPE_UNKNOWN;
@@ -2430,13 +2445,13 @@ public class MediaRouter {
                }
                return;
            }
            if (mPlaybackType == RemoteControlClient.PLAYBACK_TYPE_REMOTE) {
            if (mPlaybackType == PLAYBACK_TYPE_REMOTE) {
                int volumeControl = VolumeProvider.VOLUME_CONTROL_FIXED;
                switch (mVolumeHandling) {
                    case RemoteControlClient.PLAYBACK_VOLUME_VARIABLE:
                    case PLAYBACK_VOLUME_VARIABLE:
                        volumeControl = VolumeProvider.VOLUME_CONTROL_ABSOLUTE;
                        break;
                    case RemoteControlClient.PLAYBACK_VOLUME_FIXED:
                    case PLAYBACK_VOLUME_FIXED:
                    default:
                        break;
                }