diff options
| author | 2016-06-15 15:02:55 +0000 | |
|---|---|---|
| committer | 2016-06-15 15:02:55 +0000 | |
| commit | 7318603f4ece43a13d95d7a1bd3b91a2fcda61fc (patch) | |
| tree | b3e6fc33353a0ff6157832eb9e1a5f9ea9d641c3 | |
| parent | 4a488846121677c98f36ac6b7273b4f0d8defc97 (diff) | |
| parent | 7f9e4d13c05719e75d1271811a59ec38daa755b7 (diff) | |
Merge \"Fix accessibility for autorotate tile.\" into nyc-dev
am: 7f9e4d13c0
Change-Id: Ic0ff4b1219ca5c1723bce74cba7736521fd447aa
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/qs/tiles/RotationLockTile.java | 13 |
1 files changed, 4 insertions, 9 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 521df37b732c..499eb50e9992 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/RotationLockTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/RotationLockTile.java @@ -77,7 +77,7 @@ public class RotationLockTile extends QSTile<QSTile.BooleanState> { if (mController == null) return; MetricsLogger.action(mContext, getMetricsCategory(), !mState.value); final boolean newState = !mState.value; - mController.setRotationLocked(newState); + mController.setRotationLocked(!newState); refreshState(newState); } @@ -89,15 +89,10 @@ public class RotationLockTile extends QSTile<QSTile.BooleanState> { @Override protected void handleUpdateState(BooleanState state, Object arg) { if (mController == null) return; - final boolean rotationLocked = arg != null ? (Boolean) arg - : mController.isRotationLocked(); + final boolean rotationLocked = mController.isRotationLocked(); // TODO: Handle accessibility rotation lock and whatnot. -// state.visible = mController.isRotationLockAffordanceVisible(); - if (state.value == rotationLocked && state.contentDescription != null) { - // No change and initialized, no need to update all the values. - return; - } - state.value = rotationLocked; + + state.value = !rotationLocked; final boolean portrait = isCurrentOrientationLockPortrait(mController, mContext); if (rotationLocked) { final int label = portrait ? R.string.quick_settings_rotation_locked_portrait_label |