diff options
author | Dianne Hackborn <hackbod@google.com> | 2010-11-23 20:55:11 -0800 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2010-11-24 10:41:07 -0800 |
commit | a111187a5b4dc5d287e29ced7d65e8d20edca140 (patch) | |
tree | ddf8588ccb308b89e4d2580ec35d054483d3b656 /policy | |
parent | 9fb2807e2b1f633817c0cbcb09ffbda681d06901 (diff) | |
download | frameworks_base-a111187a5b4dc5d287e29ced7d65e8d20edca140.zip frameworks_base-a111187a5b4dc5d287e29ced7d65e8d20edca140.tar.gz frameworks_base-a111187a5b4dc5d287e29ced7d65e8d20edca140.tar.bz2 |
Change rotation freeze to all be implemented in window manager.
Lots of work for no visible change in behavior, but now we can
do some fancier stuff...
Also allow rotation in all 4 directions.
Change-Id: I7e5e9537c5e359f69b83c10f65cc1ce95f371461
Diffstat (limited to 'policy')
-rwxr-xr-x | policy/src/com/android/internal/policy/impl/PhoneWindowManager.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java index 5c8d88b..f892e9e 100755 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -241,6 +241,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { int mUserRotationMode = WindowManagerPolicy.USER_ROTATION_FREE; int mUserRotation = Surface.ROTATION_0; + boolean mAllowAllRotations; boolean mCarDockEnablesAccelerometer; boolean mDeskDockEnablesAccelerometer; int mLidKeyboardAccessibility; @@ -657,6 +658,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { com.android.internal.R.integer.config_carDockRotation); mDeskDockRotation = readRotation( com.android.internal.R.integer.config_deskDockRotation); + mAllowAllRotations = mContext.getResources().getBoolean( + com.android.internal.R.bool.config_allowAllRotations); mCarDockEnablesAccelerometer = mContext.getResources().getBoolean( com.android.internal.R.bool.config_carDockEnablesAccelerometer); mDeskDockEnablesAccelerometer = mContext.getResources().getBoolean( @@ -2344,7 +2347,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { return getCurrentPortraitRotation(lastRotation); } - mOrientationListener.setAllow180Rotation( + mOrientationListener.setAllow180Rotation(mAllowAllRotations || orientation == ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR); // case for nosensor meaning ignore sensor and consider only lid |