Permalink
Browse files

impl: Allow Rotation of Lockscreen (2/2)

Framework Side

This allows rotation of the lockscreen to be toggled per users desire in RC. It functions independent
of the state of Auto-rotate for the rest of the device.

Change-Id: I13a5eb080142f0910e13d0f3c49696333fc2344b
Signed-off-by: BMc08GT <bmc08gt.teamb00sted@encounterpc.com>

Conflicts:

	core/java/android/provider/Settings.java
  • Loading branch information...
1 parent ce96362 commit 5b50f2dcae33d3ef565085dff179fd5a3484f2c9 BMc08GT committed with Gerrit Code Review Sep 11, 2012
@@ -2120,6 +2120,12 @@ public static void setShowGTalkServiceStatus(ContentResolver cr, boolean flag) {
public static final String LOCKSCREEN_DISABLED = "lockscreen.disabled";
/**
+ * Whether to enable lockscreen rotation
+ * @hide
+ */
+ public static final String LOCKSCREEN_AUTO_ROTATE = "com.android.internal.R.config_enableLockScreenRotation";
+
+ /**
* URI for the low battery sound file.
* @hide
*/
@@ -20,6 +20,7 @@
import com.android.internal.app.ThemeUtils;
+import android.app.Activity;
import android.app.ActivityManager;
import android.content.BroadcastReceiver;
import android.content.Context;
@@ -30,6 +31,7 @@
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;
@@ -126,7 +128,8 @@ public synchronized void show() {
Resources res = getUiContext().getResources();
boolean enableScreenRotation =
SystemProperties.getBoolean("lockscreen.rot_override",false)
- || res.getBoolean(R.bool.config_enableLockScreenRotation);
+ || Settings.System.getBoolean(mContext
+ .getContentResolver(), Settings.System.LOCKSCREEN_AUTO_ROTATE, false);
if (mKeyguardHost == null) {
if (DEBUG) Log.d(TAG, "keyguard host is null, creating it...");

0 comments on commit 5b50f2d

Please sign in to comment.