From e421abe1daa06843c3357fd49ea80c7dbeb12c3f Mon Sep 17 00:00:00 2001 From: Beverly <@google.com> Date: Tue, 22 Aug 2017 14:47:28 -0400 Subject: [PATCH] Volume dialog touch-tracking is disabled when in zenMute. When simultaneously touch-sliding the volume dialog and using phone's volume buttons, volume dialog could get into a weird state where the volume dialog still thinks their is touch input after entering/exiting zenMute. This resulted in volume changes when using the phone volume buttons but no change in the volume dialog UI. To prevent this, the dialog will ensure there is no touch tracking when it's in zenMute mode. Bug: 30746594 Test: manual Change-Id: I8f16d017d8e37ec7ff2f16df8f4997f64484412e --- .../src/com/android/systemui/volume/VolumeDialogImpl.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java index 6e631fa9b926a..046988271db04 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java +++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java @@ -713,6 +713,7 @@ public class VolumeDialogImpl implements VolumeDialog, TunerService.Tunable { final boolean visible = mState.zenMode != Global.ZEN_MODE_OFF && (mAudioManager.isStreamAffectedByRingerMode(mActiveStream) || mExpanded) && !mZenPanel.isEditing(); + TransitionManager.beginDelayedTransition(mDialogView, getTransition()); if (wasVisible != visible && !visible) { prepareForCollapse(); @@ -840,6 +841,11 @@ public class VolumeDialogImpl implements VolumeDialog, TunerService.Tunable { row.icon.setContentDescription(getStreamLabelH(ss)); } + // ensure tracking is disabled if zenMuted + if (zenMuted) { + row.tracking = false; + } + // update slider final boolean enableSlider = !zenMuted; final int vlevel = row.ss.muted && (!isRingStream && !zenMuted) ? 0