diff options
author | Daniel Sandler <dsandler@google.com> | 2010-08-17 00:41:00 -0400 |
---|---|---|
committer | Daniel Sandler <dsandler@google.com> | 2010-11-04 16:55:29 -0400 |
commit | b73617de462579f7c12c25a4c2747c576f00f6a2 (patch) | |
tree | 1f070d8a32c97062feca491ed9675af8d7c874dc /core/java/android/provider | |
parent | 1ab022b8c8b063d95a591bf40109986c5b1bbb11 (diff) | |
download | frameworks_base-b73617de462579f7c12c25a4c2747c576f00f6a2.zip frameworks_base-b73617de462579f7c12c25a4c2747c576f00f6a2.tar.gz frameworks_base-b73617de462579f7c12c25a4c2747c576f00f6a2.tar.bz2 |
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
Diffstat (limited to 'core/java/android/provider')
-rw-r--r-- | core/java/android/provider/Settings.java | 11 |
1 files changed, 11 insertions, 0 deletions
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, |