You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
VolumeDialog: Fix muting streams with a minimal volume of 1
* Alarm and voice call streams report 1 as levelMin
and hence ss.muted is never true, so that the muted
icon never shows. After the first tap lastAudibleLevel
is 1 so that the second tap only sets it back to 1,
the minimal value for some streams.
That leads to a bad UX when tapping on the icon
because the first tap sets it to the minimal level and
another tap just keeps it there.
* With this patch we only set lastAudibleLevel if the
current level is higher then levelMin instead of the
hard-coded value of 0 so that the first tap sets the
volume to its minimal value and the icon changes to the
muted icon and the second tap restores the previous volume.
* Also replace the check to show the muted icon with a check
wether the current level is the minimal level.
* Increase the default value of lastAudibleLevel to 2 so that
it is never equal to the minimal value.
Change-Id: I6d0d3960a42c949e2afd61eab86f5e3ffb8fa1b5
Signed-off-by: Jesse Chan <jc@lineageos.org>
0 commit comments