Fix the "Alarm volume" icon is displayed incorrectly
Symptom: 1. Set Alarm volume to 0 on Sound & notification screen, then tap Back key and reopen the screen. 2. Set Alarm volume up to 1 or larger, then alarm icon changes to unmute. 3. Set Alarm volume down to 0, then the icon doesn't change to mute. There expected the icon should change to mute one. Detail and sample: SeekBarVolumizer manages a variable mLastAudibleStreamVolume. This variable decides whether it executes mute procedure or not. When this variable is 0, it will not execute mute procedure. Because the condition to execute mute proceduce is below. - lastAudibleVolume * (mute ? -1 : 1) < 0 What original code will not update this variable from constructor is one of problems. So once the icon changes to unmute one, the icon will never change to mute one. Solution: Changed the condition as it doesn't depend on value of lastAudibleVolume. Bug: 30265487 Change-Id: I42165f39d1f344169674c09a045b6fb2bb25db4d
Loading
Please register or sign in to comment