Loading core/res/res/values/config.xml +8 −0 Original line number Diff line number Diff line Loading @@ -214,6 +214,14 @@ rotations as the default behavior. --> <bool name="config_allowAllRotations">true</bool> <!-- If true, the direction rotation is applied to get to an application's requested orientation is reversed. Normally, the model is that landscape is clockwise from portrait; thus on a portrait device an app requesting landscape will cause a clockwise rotation, and on a landscape device an app requesting portrait will cause a counter-clockwise rotation. Setting true here reverses that logic. --> <bool name="config_reverseDefaultRotation">false</bool> <!-- The number of degrees to rotate the display when the keyboard is open. --> <integer name="config_lidOpenRotation">90</integer> Loading policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +16 −4 Original line number Diff line number Diff line Loading @@ -2360,17 +2360,29 @@ public class PhoneWindowManager implements WindowManagerPolicy { Display d = ((WindowManager)mContext.getSystemService(Context.WINDOW_SERVICE)) .getDefaultDisplay(); if (d.getWidth() > d.getHeight()) { mPortraitRotation = Surface.ROTATION_90; mLandscapeRotation = Surface.ROTATION_0; mUpsideDownRotation = Surface.ROTATION_270; mSeascapeRotation = Surface.ROTATION_180; if (mContext.getResources().getBoolean( com.android.internal.R.bool.config_reverseDefaultRotation)) { mPortraitRotation = Surface.ROTATION_90; mUpsideDownRotation = Surface.ROTATION_270; } else { mPortraitRotation = Surface.ROTATION_270; mUpsideDownRotation = Surface.ROTATION_90; } } else { mPortraitRotation = Surface.ROTATION_0; mLandscapeRotation = Surface.ROTATION_90; mUpsideDownRotation = Surface.ROTATION_180; if (mContext.getResources().getBoolean( com.android.internal.R.bool.config_reverseDefaultRotation)) { mLandscapeRotation = Surface.ROTATION_270; mSeascapeRotation = Surface.ROTATION_90; } else { mLandscapeRotation = Surface.ROTATION_90; mSeascapeRotation = Surface.ROTATION_270; } } } synchronized (mLock) { switch (orientation) { Loading Loading
core/res/res/values/config.xml +8 −0 Original line number Diff line number Diff line Loading @@ -214,6 +214,14 @@ rotations as the default behavior. --> <bool name="config_allowAllRotations">true</bool> <!-- If true, the direction rotation is applied to get to an application's requested orientation is reversed. Normally, the model is that landscape is clockwise from portrait; thus on a portrait device an app requesting landscape will cause a clockwise rotation, and on a landscape device an app requesting portrait will cause a counter-clockwise rotation. Setting true here reverses that logic. --> <bool name="config_reverseDefaultRotation">false</bool> <!-- The number of degrees to rotate the display when the keyboard is open. --> <integer name="config_lidOpenRotation">90</integer> Loading
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +16 −4 Original line number Diff line number Diff line Loading @@ -2360,17 +2360,29 @@ public class PhoneWindowManager implements WindowManagerPolicy { Display d = ((WindowManager)mContext.getSystemService(Context.WINDOW_SERVICE)) .getDefaultDisplay(); if (d.getWidth() > d.getHeight()) { mPortraitRotation = Surface.ROTATION_90; mLandscapeRotation = Surface.ROTATION_0; mUpsideDownRotation = Surface.ROTATION_270; mSeascapeRotation = Surface.ROTATION_180; if (mContext.getResources().getBoolean( com.android.internal.R.bool.config_reverseDefaultRotation)) { mPortraitRotation = Surface.ROTATION_90; mUpsideDownRotation = Surface.ROTATION_270; } else { mPortraitRotation = Surface.ROTATION_270; mUpsideDownRotation = Surface.ROTATION_90; } } else { mPortraitRotation = Surface.ROTATION_0; mLandscapeRotation = Surface.ROTATION_90; mUpsideDownRotation = Surface.ROTATION_180; if (mContext.getResources().getBoolean( com.android.internal.R.bool.config_reverseDefaultRotation)) { mLandscapeRotation = Surface.ROTATION_270; mSeascapeRotation = Surface.ROTATION_90; } else { mLandscapeRotation = Surface.ROTATION_90; mSeascapeRotation = Surface.ROTATION_270; } } } synchronized (mLock) { switch (orientation) { Loading