summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2010-12-22 12:31:31 -0800
committerDianne Hackborn <hackbod@google.com>2010-12-22 12:31:31 -0800
commit07f3d6649703ee21001ae1590bfd58282a447365 (patch)
treeec9e3d56786d93bba842cbc6bf6a0ed853486d8f /policy
parenteaa9e2750ff77c860df34273b64bc0b678a75748 (diff)
downloadframeworks_base-07f3d6649703ee21001ae1590bfd58282a447365.zip
frameworks_base-07f3d6649703ee21001ae1590bfd58282a447365.tar.gz
frameworks_base-07f3d6649703ee21001ae1590bfd58282a447365.tar.bz2
Fix issue #3194697: default orientation for portrait-mode apps on stingray is backward?
Change-Id: Ia01963d1dcdda12ef1b4c56af2bd389e5dadbce1
Diffstat (limited to 'policy')
-rwxr-xr-xpolicy/src/com/android/internal/policy/impl/PhoneWindowManager.java20
1 files changed, 16 insertions, 4 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index c6984a4..2e89a21 100755
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -2360,15 +2360,27 @@ 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;
- mSeascapeRotation = Surface.ROTATION_270;
+ 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;
+ }
}
}