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

Commit 203a2f8e authored by Takazumi Matsumoto's avatar Takazumi Matsumoto
Browse files

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
parent c8e3afba
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -26,6 +26,7 @@ import android.graphics.PixelFormat;
import android.graphics.Canvas;
import android.graphics.Canvas;
import android.os.IBinder;
import android.os.IBinder;
import android.os.SystemProperties;
import android.os.SystemProperties;
import android.provider.Settings;
import android.util.Log;
import android.util.Log;
import android.view.View;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup;
@@ -108,7 +109,7 @@ public class KeyguardViewManager implements KeyguardWindowController {
        Resources res = mContext.getResources();
        Resources res = mContext.getResources();
        boolean enableScreenRotation =
        boolean enableScreenRotation =
                SystemProperties.getBoolean("lockscreen.rot_override",false)
                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 (mKeyguardHost == null) {
            if (DEBUG) Log.d(TAG, "keyguard host is null, creating it...");
            if (DEBUG) Log.d(TAG, "keyguard host is null, creating it...");