diff options
author | Takazumi Matsumoto <tdr@taksmon.com> | 2012-01-12 17:05:01 +0000 |
---|---|---|
committer | Takazumi Matsumoto <tdr@taksmon.com> | 2012-01-16 15:33:19 +0000 |
commit | 203a2f8e905ea4427e35fd23ad89db3b92e4d094 (patch) | |
tree | 0c2d8a8b15d69e1b4a070fe3ca76d48322a5bd17 /policy | |
parent | c8e3afbaf1d2b07b9e2b52144632d893f4360c0b (diff) | |
download | frameworks_base-203a2f8e905ea4427e35fd23ad89db3b92e4d094.zip frameworks_base-203a2f8e905ea4427e35fd23ad89db3b92e4d094.tar.gz frameworks_base-203a2f8e905ea4427e35fd23ad89db3b92e4d094.tar.bz2 |
Keyguard: Add accelerometer override to lockscreen
On ICS tablets, by default the lockscreen will rotate irrespective
of the auto-rotate switch. Go back to Honeycomb-like behavior of
the switch controlling the lockscreen.
Change-Id: I697fe588c6a7d20e03e0f8ff5927834f8819c871
Diffstat (limited to 'policy')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/KeyguardViewManager.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/policy/src/com/android/internal/policy/impl/KeyguardViewManager.java b/policy/src/com/android/internal/policy/impl/KeyguardViewManager.java index ff8d5ac..289a942 100644 --- a/policy/src/com/android/internal/policy/impl/KeyguardViewManager.java +++ b/policy/src/com/android/internal/policy/impl/KeyguardViewManager.java @@ -26,6 +26,7 @@ import android.graphics.PixelFormat; import android.graphics.Canvas; import android.os.IBinder; import android.os.SystemProperties; +import android.provider.Settings; import android.util.Log; import android.view.View; import android.view.ViewGroup; @@ -108,7 +109,7 @@ public class KeyguardViewManager implements KeyguardWindowController { Resources res = mContext.getResources(); boolean enableScreenRotation = SystemProperties.getBoolean("lockscreen.rot_override",false) - || res.getBoolean(R.bool.config_enableLockScreenRotation); + || (res.getBoolean(R.bool.config_enableLockScreenRotation) && (Settings.System.getInt(mContext.getContentResolver(), Settings.System.ACCELEROMETER_ROTATION, 1) != 0)); if (mKeyguardHost == null) { if (DEBUG) Log.d(TAG, "keyguard host is null, creating it..."); |