Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 56bacd76 authored by Jim Miller's avatar Jim Miller
Browse files

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
parent 920d06db
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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...");