diff options
author | Jason Monk <jmonk@google.com> | 2015-06-11 09:23:16 -0400 |
---|---|---|
committer | Jason Monk <jmonk@google.com> | 2015-06-11 09:23:16 -0400 |
commit | 6215478e567b9d12df8d701c2312e7bc4a3f7570 (patch) | |
tree | 8513a0a09a8a4d636e5345cb5b21b27e9640028c /packages/SystemUI/src/com/android/systemui/qs | |
parent | 94fc0c2630926cdf1d246270441a4301f03eeaca (diff) | |
download | frameworks_base-6215478e567b9d12df8d701c2312e7bc4a3f7570.zip frameworks_base-6215478e567b9d12df8d701c2312e7bc4a3f7570.tar.gz frameworks_base-6215478e567b9d12df8d701c2312e7bc4a3f7570.tar.bz2 |
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
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/qs')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/qs/tiles/RotationLockTile.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/RotationLockTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/RotationLockTile.java index 7c378f0..915867b 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/RotationLockTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/RotationLockTile.java @@ -73,6 +73,10 @@ public class RotationLockTile extends QSTile<QSTile.BooleanState> { : mController.isRotationLocked(); final boolean userInitiated = arg != null ? ((UserBoolean) arg).userInitiated : false; state.visible = mController.isRotationLockAffordanceVisible(); + if (state.value == rotationLocked) { + // No change, no need to update all the values. + return; + } state.value = rotationLocked; final boolean portrait = mContext.getResources().getConfiguration().orientation != Configuration.ORIENTATION_LANDSCAPE; |