Loading core/res/res/values-sw600dp/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -32,5 +32,8 @@ <!-- see comment in values/config.xml --> <dimen name="config_prefDialogWidth">580dp</dimen> <!-- If true, the screen can be rotated via the accelerometer in all 4 rotations as the default behavior. --> <bool name="config_allowAllRotations">true</bool> </resources> core/res/res/values/config.xml +1 −1 Original line number Diff line number Diff line Loading @@ -231,7 +231,7 @@ <!-- If true, the screen can be rotated via the accelerometer in all 4 rotations as the default behavior. --> <bool name="config_allowAllRotations">true</bool> <bool name="config_allowAllRotations">false</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 Loading policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +9 −4 Original line number Diff line number Diff line Loading @@ -280,7 +280,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { int mUserRotationMode = WindowManagerPolicy.USER_ROTATION_FREE; int mUserRotation = Surface.ROTATION_0; boolean mAllowAllRotations; int mAllowAllRotations = -1; boolean mCarDockEnablesAccelerometer; boolean mDeskDockEnablesAccelerometer; int mLidKeyboardAccessibility; Loading Loading @@ -681,8 +681,6 @@ 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( Loading Loading @@ -2921,8 +2919,15 @@ public class PhoneWindowManager implements WindowManagerPolicy { || orientation == ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT) { // Otherwise, use sensor only if requested by the application or enabled // by default for USER or UNSPECIFIED modes. Does not apply to NOSENSOR. if (mAllowAllRotations < 0) { // Can't read this during init() because the context doesn't // have display metrics at that time so we cannot determine // tablet vs. phone then. mAllowAllRotations = mContext.getResources().getBoolean( com.android.internal.R.bool.config_allowAllRotations) ? 1 : 0; } if (sensorRotation != Surface.ROTATION_180 || mAllowAllRotations || mAllowAllRotations == 1 || orientation == ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR) { preferredRotation = sensorRotation; } else { Loading Loading
core/res/res/values-sw600dp/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -32,5 +32,8 @@ <!-- see comment in values/config.xml --> <dimen name="config_prefDialogWidth">580dp</dimen> <!-- If true, the screen can be rotated via the accelerometer in all 4 rotations as the default behavior. --> <bool name="config_allowAllRotations">true</bool> </resources>
core/res/res/values/config.xml +1 −1 Original line number Diff line number Diff line Loading @@ -231,7 +231,7 @@ <!-- If true, the screen can be rotated via the accelerometer in all 4 rotations as the default behavior. --> <bool name="config_allowAllRotations">true</bool> <bool name="config_allowAllRotations">false</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 Loading
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +9 −4 Original line number Diff line number Diff line Loading @@ -280,7 +280,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { int mUserRotationMode = WindowManagerPolicy.USER_ROTATION_FREE; int mUserRotation = Surface.ROTATION_0; boolean mAllowAllRotations; int mAllowAllRotations = -1; boolean mCarDockEnablesAccelerometer; boolean mDeskDockEnablesAccelerometer; int mLidKeyboardAccessibility; Loading Loading @@ -681,8 +681,6 @@ 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( Loading Loading @@ -2921,8 +2919,15 @@ public class PhoneWindowManager implements WindowManagerPolicy { || orientation == ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT) { // Otherwise, use sensor only if requested by the application or enabled // by default for USER or UNSPECIFIED modes. Does not apply to NOSENSOR. if (mAllowAllRotations < 0) { // Can't read this during init() because the context doesn't // have display metrics at that time so we cannot determine // tablet vs. phone then. mAllowAllRotations = mContext.getResources().getBoolean( com.android.internal.R.bool.config_allowAllRotations) ? 1 : 0; } if (sensorRotation != Surface.ROTATION_180 || mAllowAllRotations || mAllowAllRotations == 1 || orientation == ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR) { preferredRotation = sensorRotation; } else { Loading