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

Commit 6215478e authored by Jason Monk's avatar Jason Monk
Browse files

Fix rotation tile animation

Don't call setAllowAnimation unless there is a state change.
Also don't bother updating the rest of the state as it hasn't
changed.

Bug: 21337755
Change-Id: Ia3357e075c8e65fdb83232b685332c98e16c291d
parent 94fc0c26
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -73,6 +73,10 @@ public class RotationLockTile extends QSTile<QSTile.BooleanState> {
                : mController.isRotationLocked();
                : mController.isRotationLocked();
        final boolean userInitiated = arg != null ? ((UserBoolean) arg).userInitiated : false;
        final boolean userInitiated = arg != null ? ((UserBoolean) arg).userInitiated : false;
        state.visible = mController.isRotationLockAffordanceVisible();
        state.visible = mController.isRotationLockAffordanceVisible();
        if (state.value == rotationLocked) {
            // No change, no need to update all the values.
            return;
        }
        state.value = rotationLocked;
        state.value = rotationLocked;
        final boolean portrait = mContext.getResources().getConfiguration().orientation
        final boolean portrait = mContext.getResources().getConfiguration().orientation
                != Configuration.ORIENTATION_LANDSCAPE;
                != Configuration.ORIENTATION_LANDSCAPE;