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

Commit 5454bc19 authored by Alan Viverette's avatar Alan Viverette Committed by Android (Google) Code Review
Browse files

Merge "Use correct checked value when animating Switch" into lmp-dev

parents e25547b3 467d629c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -833,6 +833,10 @@ public class Switch extends CompoundButton {
    public void setChecked(boolean checked) {
        super.setChecked(checked);

        // Calling the super method may result in setChecked() getting called
        // recursively with a different value, so load the REAL value...
        checked = isChecked();

        if (isAttachedToWindow() && isLaidOut()) {
            animateThumbToCheckedState(checked);
        } else {