Loading api/current.xml +11 −0 Original line number Diff line number Diff line Loading @@ -161089,6 +161089,17 @@ visibility="public" > </field> <field name="USER_ROTATION" type="java.lang.String" transient="false" volatile="false" value=""user_rotation"" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="USE_GOOGLE_MAIL" type="java.lang.String" transient="false" core/java/android/provider/Settings.java +11 −0 Original line number Diff line number Diff line Loading @@ -1572,6 +1572,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). Loading Loading @@ -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, Loading core/java/android/view/IWindowManager.aidl +13 −0 Original line number Diff line number Diff line Loading @@ -156,4 +156,17 @@ interface IWindowManager * calls back when it changes. */ int watchRotation(IRotationWatcher watcher); /** * Lock the device orientation to the current rotation. Sensor input will * be ignored until thawRotation() is called. * @hide */ void freezeRotation(); /** * Release the orientation lock imposed by freezeRotation(). * @hide */ void thawRotation(); } core/java/android/view/WindowManagerPolicy.java +17 −0 Original line number Diff line number Diff line Loading @@ -363,6 +363,13 @@ public interface WindowManagerPolicy { */ public final int USE_LAST_ROTATION = -1000; /** When not otherwise specified by the activity's screenOrientation, rotation should be * determined by the system (that is, using sensors). */ public final int USER_ROTATION_FREE = 0; /** When not otherwise specified by the activity's screenOrientation, rotation is set by * the user. */ public final int USER_ROTATION_LOCKED = 1; /** * Perform initialization of the policy. * Loading Loading @@ -787,4 +794,14 @@ public interface WindowManagerPolicy { * Return false to disable key repeat events from being generated. */ public boolean allowKeyRepeat(); /** * Inform the policy that the user has chosen a preferred orientation ("rotation lock"). * * @param mode One of {@link WindowManagerPolicy#USER_ROTATION_LOCKED} or * {@link * WindowManagerPolicy#USER_ROTATION_FREE}. * @param rotation One of {@link Surface#ROTATION_0}, {@link Surface#ROTATION_90}, * {@link Surface#ROTATION_180}, {@link Surface#ROTATION_270}. */ public void setUserRotationMode(int mode, int rotation); } packages/SettingsProvider/res/values/defaults.xml +2 −0 Original line number Diff line number Diff line Loading @@ -103,4 +103,6 @@ 0x120016=0x03050601:0x03040501:0x03030401:0x03020301:0x03070301:0x03010301:0x03000301; </string> <!-- Default for Settings.System.USER_ROTATION --> <integer name="def_user_rotation">0</integer> </resources> Loading
api/current.xml +11 −0 Original line number Diff line number Diff line Loading @@ -161089,6 +161089,17 @@ visibility="public" > </field> <field name="USER_ROTATION" type="java.lang.String" transient="false" volatile="false" value=""user_rotation"" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="USE_GOOGLE_MAIL" type="java.lang.String" transient="false"
core/java/android/provider/Settings.java +11 −0 Original line number Diff line number Diff line Loading @@ -1572,6 +1572,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). Loading Loading @@ -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, Loading
core/java/android/view/IWindowManager.aidl +13 −0 Original line number Diff line number Diff line Loading @@ -156,4 +156,17 @@ interface IWindowManager * calls back when it changes. */ int watchRotation(IRotationWatcher watcher); /** * Lock the device orientation to the current rotation. Sensor input will * be ignored until thawRotation() is called. * @hide */ void freezeRotation(); /** * Release the orientation lock imposed by freezeRotation(). * @hide */ void thawRotation(); }
core/java/android/view/WindowManagerPolicy.java +17 −0 Original line number Diff line number Diff line Loading @@ -363,6 +363,13 @@ public interface WindowManagerPolicy { */ public final int USE_LAST_ROTATION = -1000; /** When not otherwise specified by the activity's screenOrientation, rotation should be * determined by the system (that is, using sensors). */ public final int USER_ROTATION_FREE = 0; /** When not otherwise specified by the activity's screenOrientation, rotation is set by * the user. */ public final int USER_ROTATION_LOCKED = 1; /** * Perform initialization of the policy. * Loading Loading @@ -787,4 +794,14 @@ public interface WindowManagerPolicy { * Return false to disable key repeat events from being generated. */ public boolean allowKeyRepeat(); /** * Inform the policy that the user has chosen a preferred orientation ("rotation lock"). * * @param mode One of {@link WindowManagerPolicy#USER_ROTATION_LOCKED} or * {@link * WindowManagerPolicy#USER_ROTATION_FREE}. * @param rotation One of {@link Surface#ROTATION_0}, {@link Surface#ROTATION_90}, * {@link Surface#ROTATION_180}, {@link Surface#ROTATION_270}. */ public void setUserRotationMode(int mode, int rotation); }
packages/SettingsProvider/res/values/defaults.xml +2 −0 Original line number Diff line number Diff line Loading @@ -103,4 +103,6 @@ 0x120016=0x03050601:0x03040501:0x03030401:0x03020301:0x03070301:0x03010301:0x03000301; </string> <!-- Default for Settings.System.USER_ROTATION --> <integer name="def_user_rotation">0</integer> </resources>