Loading core/java/android/provider/Settings.java +8 −0 Original line number Original line Diff line number Diff line Loading @@ -2131,6 +2131,13 @@ public final class Settings { */ */ public static final String ACCELEROMETER_ROTATION = "accelerometer_rotation"; public static final String ACCELEROMETER_ROTATION = "accelerometer_rotation"; /** * Control whether the accelerometer will be used to change lockscreen * orientation. If 0, it will not be used; if 1, it will be used by default. * @hide */ public static final String LOCKSCREEN_ROTATION = "lockscreen_rotation"; /** /** * Control the type of rotation which can be performed using the accelerometer * Control the type of rotation which can be performed using the accelerometer * if ACCELEROMETER_ROTATION is enabled. * if ACCELEROMETER_ROTATION is enabled. Loading Loading @@ -3222,6 +3229,7 @@ public final class Settings { TIME_12_24, TIME_12_24, DATE_FORMAT, DATE_FORMAT, ACCELEROMETER_ROTATION, ACCELEROMETER_ROTATION, LOCKSCREEN_ROTATION, USER_ROTATION, USER_ROTATION, DTMF_TONE_WHEN_DIALING, DTMF_TONE_WHEN_DIALING, DTMF_TONE_TYPE_WHEN_DIALING, DTMF_TONE_TYPE_WHEN_DIALING, Loading policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java +5 −1 Original line number Original line Diff line number Diff line Loading @@ -125,8 +125,12 @@ public class KeyguardViewManager { private boolean shouldEnableScreenRotation() { private boolean shouldEnableScreenRotation() { Resources res = mContext.getResources(); Resources res = mContext.getResources(); boolean enableLockScreenRotation = Settings.System.getInt(mContext.getContentResolver(), Settings.System.LOCKSCREEN_ROTATION, 0) != 0; boolean enableAccelerometerRotation = Settings.System.getInt(mContext.getContentResolver(), Settings.System.ACCELEROMETER_ROTATION, 1) != 0; return SystemProperties.getBoolean("lockscreen.rot_override",false) return SystemProperties.getBoolean("lockscreen.rot_override",false) || res.getBoolean(com.android.internal.R.bool.config_enableLockScreenRotation); || (enableLockScreenRotation && enableAccelerometerRotation); } } class ViewManagerHost extends FrameLayout { class ViewManagerHost extends FrameLayout { Loading Loading
core/java/android/provider/Settings.java +8 −0 Original line number Original line Diff line number Diff line Loading @@ -2131,6 +2131,13 @@ public final class Settings { */ */ public static final String ACCELEROMETER_ROTATION = "accelerometer_rotation"; public static final String ACCELEROMETER_ROTATION = "accelerometer_rotation"; /** * Control whether the accelerometer will be used to change lockscreen * orientation. If 0, it will not be used; if 1, it will be used by default. * @hide */ public static final String LOCKSCREEN_ROTATION = "lockscreen_rotation"; /** /** * Control the type of rotation which can be performed using the accelerometer * Control the type of rotation which can be performed using the accelerometer * if ACCELEROMETER_ROTATION is enabled. * if ACCELEROMETER_ROTATION is enabled. Loading Loading @@ -3222,6 +3229,7 @@ public final class Settings { TIME_12_24, TIME_12_24, DATE_FORMAT, DATE_FORMAT, ACCELEROMETER_ROTATION, ACCELEROMETER_ROTATION, LOCKSCREEN_ROTATION, USER_ROTATION, USER_ROTATION, DTMF_TONE_WHEN_DIALING, DTMF_TONE_WHEN_DIALING, DTMF_TONE_TYPE_WHEN_DIALING, DTMF_TONE_TYPE_WHEN_DIALING, Loading
policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java +5 −1 Original line number Original line Diff line number Diff line Loading @@ -125,8 +125,12 @@ public class KeyguardViewManager { private boolean shouldEnableScreenRotation() { private boolean shouldEnableScreenRotation() { Resources res = mContext.getResources(); Resources res = mContext.getResources(); boolean enableLockScreenRotation = Settings.System.getInt(mContext.getContentResolver(), Settings.System.LOCKSCREEN_ROTATION, 0) != 0; boolean enableAccelerometerRotation = Settings.System.getInt(mContext.getContentResolver(), Settings.System.ACCELEROMETER_ROTATION, 1) != 0; return SystemProperties.getBoolean("lockscreen.rot_override",false) return SystemProperties.getBoolean("lockscreen.rot_override",false) || res.getBoolean(com.android.internal.R.bool.config_enableLockScreenRotation); || (enableLockScreenRotation && enableAccelerometerRotation); } } class ViewManagerHost extends FrameLayout { class ViewManagerHost extends FrameLayout { Loading