From b73617de462579f7c12c25a4c2747c576f00f6a2 Mon Sep 17 00:00:00 2001 From: Daniel Sandler Date: Tue, 17 Aug 2010 00:41:00 -0400 Subject: Rotation lock. IWindowManager now supports two new methods, freezeRotation() and thawRotation(), that allow a caller to temporarily stash the device's current rotation as the default rotation (when no other constraints are present). The system bar uses this to implement a user-accessible rotation lock by calling freezeRotation() and then turning off accelerometer-based display rotation; unless overridden by an app, the display will continue to appear in the frozen rotation until the rotation is unlocked by the user (either via the rotation lock icon in the system bar or by checking "rotate screen automatically" in Settings). Bug: 2949639 Change-Id: Icd21c169d1053719590e72401f229424b254622f --- core/java/android/provider/Settings.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'core/java/android/provider') diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 2229964..9c72dec 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -1573,6 +1573,16 @@ public final class Settings { public static final String ACCELEROMETER_ROTATION = "accelerometer_rotation"; /** + * Default screen rotation when no other policy applies. + * When {@link #ACCELEROMETER_ROTATION} is zero and no on-screen Activity expresses a + * preference, this rotation value will be used. Must be one of the + * {@link android.view.Surface#ROTATION_0 Surface rotation constants}. + * + * @see Display#getRotation + */ + public static final String USER_ROTATION = "user_rotation"; + + /** * Whether the audible DTMF tones are played by the dialer when dialing. The value is * boolean (1 or 0). */ @@ -1806,6 +1816,7 @@ public final class Settings { TIME_12_24, DATE_FORMAT, ACCELEROMETER_ROTATION, + USER_ROTATION, DTMF_TONE_WHEN_DIALING, DTMF_TONE_TYPE_WHEN_DIALING, EMERGENCY_TONE, -- cgit v1.1