Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6b224a84 authored by Angela Wang's avatar Angela Wang
Browse files

Fix: Ensure slider value is reset to min when disabled

If the slider's disabled state doesn't change from the previous state, the value may not be correctly updated to its minimum. This change removes the redundant check, guaranteeing the value is always reset when the slider is disabled, regardless of its prior state.

Flag: EXEMPT bugfix
Bug: 417628947
Test: atest AmbientVolumeLayoutTest
Change-Id: I91f55968183c13d94c83bbcdc7440adcd6fcd4e6
parent 3b9f3fef
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -260,7 +260,7 @@ public class AmbientVolumeLayout extends LinearLayout implements AmbientVolumeUi
    @Override
    public void setSliderEnabled(int side, boolean enabled) {
        AmbientVolumeSlider slider = mSideToSliderMap.get(side);
        if (slider != null && slider.isEnabled() != enabled) {
        if (slider != null) {
            slider.setEnabled(enabled);
            if (!enabled) {
                slider.setValue(slider.getMin());