Skip to content

Commit 56bacd7

Browse files
author
Jim Miller
committed
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
1 parent 920d06d commit 56bacd7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

policy/src/com/android/internal/policy/impl/KeyguardViewManager.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import android.content.res.Resources;
2525
import android.graphics.PixelFormat;
2626
import android.graphics.Canvas;
27+
import android.os.SystemProperties;
2728
import android.util.Log;
2829
import android.view.View;
2930
import android.view.ViewGroup;
@@ -100,7 +101,9 @@ public synchronized void show() {
100101
if (DEBUG) Log.d(TAG, "show(); mKeyguardView==" + mKeyguardView);
101102

102103
Resources res = mContext.getResources();
103-
boolean enableScreenRotation = res.getBoolean(R.bool.config_enableLockScreenRotation);
104+
boolean enableScreenRotation =
105+
SystemProperties.getBoolean("lockscreen.rot_override",false)
106+
|| res.getBoolean(R.bool.config_enableLockScreenRotation);
104107
if (mKeyguardHost == null) {
105108
if (DEBUG) Log.d(TAG, "keyguard host is null, creating it...");
106109

0 commit comments

Comments
 (0)