From 798b0c3fabd4cdb1250488a19025b239ad97e310 Mon Sep 17 00:00:00 2001 From: Julia Reynolds Date: Tue, 1 Sep 2015 14:35:53 -0400 Subject: [PATCH] Handle streams that have a min level above 0. The dialog will continue to stop at the minimum level on drag, but won't show zero on reopening the dialog or pressing the mute icon. Bug: 23581121 Change-Id: Idaa313e48b1a56e91ed4c4895ad69f79bef293a3 --- .../src/com/android/systemui/volume/VolumeDialog.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java index 95a8d391c8ebd..6475cbf158cbd 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java +++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java @@ -421,8 +421,9 @@ public class VolumeDialog { } } } else { - final boolean vmute = row.ss.level == 0; - mController.setStreamVolume(stream, vmute ? row.lastAudibleLevel : 0); + final boolean vmute = row.ss.level == row.ss.levelMin; + mController.setStreamVolume(stream, + vmute ? row.lastAudibleLevel : row.ss.levelMin); } row.userAttempt = 0; // reset the grace period, slider should update immediately } @@ -1024,6 +1025,7 @@ public class VolumeDialog { final int minProgress = mRow.ss.levelMin * 100; if (progress < minProgress) { seekBar.setProgress(minProgress); + progress = minProgress; } } final int userLevel = getImpliedLevel(seekBar, progress);