Loading core/res/res/values/config.xml +3 −0 Original line number Original line Diff line number Diff line Loading @@ -572,6 +572,9 @@ docked if the dock is configured to enable the accelerometer. --> docked if the dock is configured to enable the accelerometer. --> <bool name="config_supportAutoRotation">true</bool> <bool name="config_supportAutoRotation">true</bool> <!-- If true, allows rotation resolver service to help resolve screen rotation. --> <bool name="config_allowRotationResolver">true</bool> <!-- If true, the screen can be rotated via the accelerometer in all 4 <!-- If true, the screen can be rotated via the accelerometer in all 4 rotations as the default behavior. --> rotations as the default behavior. --> <bool name="config_allowAllRotations">false</bool> <bool name="config_allowAllRotations">false</bool> Loading core/res/res/values/symbols.xml +1 −0 Original line number Original line Diff line number Diff line Loading @@ -1754,6 +1754,7 @@ <java-symbol type="bool" name="config_perDisplayFocusEnabled" /> <java-symbol type="bool" name="config_perDisplayFocusEnabled" /> <java-symbol type="bool" name="config_showNavigationBar" /> <java-symbol type="bool" name="config_showNavigationBar" /> <java-symbol type="bool" name="config_supportAutoRotation" /> <java-symbol type="bool" name="config_supportAutoRotation" /> <java-symbol type="bool" name="config_allowRotationResolver" /> <java-symbol type="bool" name="config_dockedStackDividerFreeSnapMode" /> <java-symbol type="bool" name="config_dockedStackDividerFreeSnapMode" /> <java-symbol type="dimen" name="docked_stack_divider_thickness" /> <java-symbol type="dimen" name="docked_stack_divider_thickness" /> <java-symbol type="dimen" name="docked_stack_divider_insets" /> <java-symbol type="dimen" name="docked_stack_divider_insets" /> Loading services/core/java/com/android/server/wm/DisplayRotation.java +5 −1 Original line number Original line Diff line number Diff line Loading @@ -123,6 +123,7 @@ public class DisplayRotation { public final boolean isDefaultDisplay; public final boolean isDefaultDisplay; private final boolean mSupportAutoRotation; private final boolean mSupportAutoRotation; private final boolean mAllowRotationResolver; private final int mLidOpenRotation; private final int mLidOpenRotation; private final int mCarDockRotation; private final int mCarDockRotation; private final int mDeskDockRotation; private final int mDeskDockRotation; Loading Loading @@ -265,6 +266,8 @@ public class DisplayRotation { mSupportAutoRotation = mSupportAutoRotation = mContext.getResources().getBoolean(R.bool.config_supportAutoRotation); mContext.getResources().getBoolean(R.bool.config_supportAutoRotation); mAllowRotationResolver = mContext.getResources().getBoolean(R.bool.config_allowRotationResolver); mLidOpenRotation = readRotation(R.integer.config_lidOpenRotation); mLidOpenRotation = readRotation(R.integer.config_lidOpenRotation); mCarDockRotation = readRotation(R.integer.config_carDockRotation); mCarDockRotation = readRotation(R.integer.config_carDockRotation); mDeskDockRotation = readRotation(R.integer.config_deskDockRotation); mDeskDockRotation = readRotation(R.integer.config_deskDockRotation); Loading Loading @@ -2002,7 +2005,8 @@ public class DisplayRotation { @Override @Override public boolean isRotationResolverEnabled() { public boolean isRotationResolverEnabled() { return mUserRotationMode == WindowManagerPolicy.USER_ROTATION_FREE return mAllowRotationResolver && mUserRotationMode == WindowManagerPolicy.USER_ROTATION_FREE && mCameraRotationMode == CAMERA_ROTATION_ENABLED && mCameraRotationMode == CAMERA_ROTATION_ENABLED && !mService.mPowerManager.isPowerSaveMode(); && !mService.mPowerManager.isPowerSaveMode(); } } Loading Loading
core/res/res/values/config.xml +3 −0 Original line number Original line Diff line number Diff line Loading @@ -572,6 +572,9 @@ docked if the dock is configured to enable the accelerometer. --> docked if the dock is configured to enable the accelerometer. --> <bool name="config_supportAutoRotation">true</bool> <bool name="config_supportAutoRotation">true</bool> <!-- If true, allows rotation resolver service to help resolve screen rotation. --> <bool name="config_allowRotationResolver">true</bool> <!-- If true, the screen can be rotated via the accelerometer in all 4 <!-- If true, the screen can be rotated via the accelerometer in all 4 rotations as the default behavior. --> rotations as the default behavior. --> <bool name="config_allowAllRotations">false</bool> <bool name="config_allowAllRotations">false</bool> Loading
core/res/res/values/symbols.xml +1 −0 Original line number Original line Diff line number Diff line Loading @@ -1754,6 +1754,7 @@ <java-symbol type="bool" name="config_perDisplayFocusEnabled" /> <java-symbol type="bool" name="config_perDisplayFocusEnabled" /> <java-symbol type="bool" name="config_showNavigationBar" /> <java-symbol type="bool" name="config_showNavigationBar" /> <java-symbol type="bool" name="config_supportAutoRotation" /> <java-symbol type="bool" name="config_supportAutoRotation" /> <java-symbol type="bool" name="config_allowRotationResolver" /> <java-symbol type="bool" name="config_dockedStackDividerFreeSnapMode" /> <java-symbol type="bool" name="config_dockedStackDividerFreeSnapMode" /> <java-symbol type="dimen" name="docked_stack_divider_thickness" /> <java-symbol type="dimen" name="docked_stack_divider_thickness" /> <java-symbol type="dimen" name="docked_stack_divider_insets" /> <java-symbol type="dimen" name="docked_stack_divider_insets" /> Loading
services/core/java/com/android/server/wm/DisplayRotation.java +5 −1 Original line number Original line Diff line number Diff line Loading @@ -123,6 +123,7 @@ public class DisplayRotation { public final boolean isDefaultDisplay; public final boolean isDefaultDisplay; private final boolean mSupportAutoRotation; private final boolean mSupportAutoRotation; private final boolean mAllowRotationResolver; private final int mLidOpenRotation; private final int mLidOpenRotation; private final int mCarDockRotation; private final int mCarDockRotation; private final int mDeskDockRotation; private final int mDeskDockRotation; Loading Loading @@ -265,6 +266,8 @@ public class DisplayRotation { mSupportAutoRotation = mSupportAutoRotation = mContext.getResources().getBoolean(R.bool.config_supportAutoRotation); mContext.getResources().getBoolean(R.bool.config_supportAutoRotation); mAllowRotationResolver = mContext.getResources().getBoolean(R.bool.config_allowRotationResolver); mLidOpenRotation = readRotation(R.integer.config_lidOpenRotation); mLidOpenRotation = readRotation(R.integer.config_lidOpenRotation); mCarDockRotation = readRotation(R.integer.config_carDockRotation); mCarDockRotation = readRotation(R.integer.config_carDockRotation); mDeskDockRotation = readRotation(R.integer.config_deskDockRotation); mDeskDockRotation = readRotation(R.integer.config_deskDockRotation); Loading Loading @@ -2002,7 +2005,8 @@ public class DisplayRotation { @Override @Override public boolean isRotationResolverEnabled() { public boolean isRotationResolverEnabled() { return mUserRotationMode == WindowManagerPolicy.USER_ROTATION_FREE return mAllowRotationResolver && mUserRotationMode == WindowManagerPolicy.USER_ROTATION_FREE && mCameraRotationMode == CAMERA_ROTATION_ENABLED && mCameraRotationMode == CAMERA_ROTATION_ENABLED && !mService.mPowerManager.isPowerSaveMode(); && !mService.mPowerManager.isPowerSaveMode(); } } Loading