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

Commit f37d0ebe authored by Lin Guo's avatar Lin Guo
Browse files

Only show the volume dialog if the AudioManager.FLAG_SHOW_UI bit is set

Bug: 109841417
Test: manual

Change-Id: Icc803a4b22ceccff7d3e788b9164975a8e395a3b
parent c8cdc593
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ import android.graphics.drawable.ColorDrawable;
import android.graphics.PixelFormat;
import android.graphics.drawable.Drawable;
import android.media.AudioAttributes;
import android.media.AudioManager;
import android.os.Debug;
import android.os.Handler;
import android.os.IBinder;
@@ -536,9 +537,11 @@ public class CarVolumeDialogImpl implements VolumeDialog {
      if (value != volumeItem.progress) {
        volumeItem.listItem.setProgress(value);
        volumeItem.progress = value;
        if ((flags & AudioManager.FLAG_SHOW_UI) != 0) {
          show(Events.SHOW_REASON_VOLUME_CHANGED);
        }
      }
    }

    @Override
    public void onMasterMuteChanged(int flags) {