From 56bacd76b2e8caaad6be933ceb7168e046f7253e Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Fri, 9 Sep 2011 14:12:54 -0700 Subject: [PATCH] Allow lockscreen orientation to be overridden with a system property. There are cases where lockscreen changes orientation (when docked, etc.), but it's not easy to test. This allows lockscreen's behavior to be overridden by command-line. Change-Id: I7ce1e2ca0ea03a9034a6f537e33650e99e3594d8 --- .../android/internal/policy/impl/KeyguardViewManager.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/policy/src/com/android/internal/policy/impl/KeyguardViewManager.java b/policy/src/com/android/internal/policy/impl/KeyguardViewManager.java index 337881f10ccb1..cbf1c90c5cc51 100644 --- a/policy/src/com/android/internal/policy/impl/KeyguardViewManager.java +++ b/policy/src/com/android/internal/policy/impl/KeyguardViewManager.java @@ -24,6 +24,7 @@ import android.content.pm.ActivityInfo; import android.content.res.Resources; import android.graphics.PixelFormat; import android.graphics.Canvas; +import android.os.SystemProperties; import android.util.Log; import android.view.View; import android.view.ViewGroup; @@ -100,7 +101,9 @@ public class KeyguardViewManager implements KeyguardWindowController { if (DEBUG) Log.d(TAG, "show(); mKeyguardView==" + mKeyguardView); Resources res = mContext.getResources(); - boolean enableScreenRotation = res.getBoolean(R.bool.config_enableLockScreenRotation); + boolean enableScreenRotation = + SystemProperties.getBoolean("lockscreen.rot_override",false) + || res.getBoolean(R.bool.config_enableLockScreenRotation); if (mKeyguardHost == null) { if (DEBUG) Log.d(TAG, "keyguard host is null, creating it...");