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

Commit d971fa92 authored by Altaf-Mahdi's avatar Altaf-Mahdi Committed by Gerrit Code Review
Browse files

Volume: fix: Avoid making bad forceVolumeControlStream call.

clean up after this patch https://github.com/android/platform_frameworks_base/commit/e506c85eaa0b81359b6472825bec038750fae6d7

also remove duplicate mDialog.show();

Change-Id: I561ba18fe2b778b483c6ca75958d8b4a274e8c5c
parent 4badcf21
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -1298,14 +1298,12 @@ public class VolumePanel extends Handler implements DemoMode {
        if (!isShowing()) {
            int stream = (streamType == STREAM_REMOTE_MUSIC) ? -1 : streamType;
            // when the stream is for remote playback, use -1 to reset the stream type evaluation
            mAudioManager.forceVolumeControlStream(stream);
            if (mDialog != null) {
                mDialog.show();
            }
            if (stream != STREAM_MASTER) {
                mAudioManager.forceVolumeControlStream(stream);
            }
            mDialog.show();
            if (mCallback != null) {
                mCallback.onVisible(true);
            }