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
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java
index 95a8d39..6475cbf 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 @@
}
}
} 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 @@
final int minProgress = mRow.ss.levelMin * 100;
if (progress < minProgress) {
seekBar.setProgress(minProgress);
+ progress = minProgress;
}
}
final int userLevel = getImpliedLevel(seekBar, progress);