Loading core/res/res/values/config.xml +5 −4 Original line number Diff line number Diff line Loading @@ -323,8 +323,9 @@ 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> <!-- The number of degrees to rotate the display when the keyboard is open. A value of -1 means no change in orientation by default. --> <integer name="config_lidOpenRotation">-1</integer> <!-- The number of degrees to rotate the display when the device is in a desk dock. A value of -1 means no change in orientation by default. --> Loading Loading @@ -370,8 +371,8 @@ <!-- Indicate whether the lid state impacts the accessibility of the physical keyboard. 0 means it doesn't, 1 means it is accessible when the lid is open, 2 means it is accessible when the lid is closed. The default is 1. --> <integer name="config_lidKeyboardAccessibility">1</integer> closed. The default is 0. --> <integer name="config_lidKeyboardAccessibility">0</integer> <!-- Indicate whether the lid state impacts the accessibility of the physical keyboard. 0 means it doesn't, 1 means it is accessible Loading policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +9 −9 Original line number Diff line number Diff line Loading @@ -327,7 +327,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { RecentApplicationsDialog mRecentAppsDialog; int mRecentAppsDialogHeldModifiers; int mLidOpen = LID_ABSENT; int mLidState = LID_ABSENT; boolean mSystemReady; boolean mSystemBooted; Loading Loading @@ -1225,16 +1225,16 @@ public class PhoneWindowManager implements WindowManagerPolicy { } void readLidState() { mLidOpen = mWindowManagerFuncs.getLidState(); mLidState = mWindowManagerFuncs.getLidState(); } private int determineHiddenState(int mode, int hiddenValue, int visibleValue) { if (mLidOpen != LID_ABSENT) { if (mLidState != LID_ABSENT) { switch (mode) { case 1: return mLidOpen == LID_OPEN ? visibleValue : hiddenValue; return mLidState == LID_OPEN ? visibleValue : hiddenValue; case 2: return mLidOpen == LID_OPEN ? hiddenValue : visibleValue; return mLidState == LID_OPEN ? hiddenValue : visibleValue; } } return visibleValue; Loading Loading @@ -2797,7 +2797,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { if (mHeadless) return; // lid changed state mLidOpen = lidOpen ? LID_OPEN : LID_CLOSED; mLidState = lidOpen ? LID_OPEN : LID_CLOSED; updateKeyboardVisibility(); boolean awakeNow = mKeyguardMediator.doLidChangeTq(lidOpen); Loading Loading @@ -3486,7 +3486,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { } final int preferredRotation; if (mLidOpen == LID_OPEN && mLidOpenRotation >= 0) { if (mLidState == LID_OPEN && mLidOpenRotation >= 0) { // Ignore sensor when lid switch is open and rotation is forced. preferredRotation = mLidOpenRotation; } else if (mDockMode == Intent.EXTRA_DOCK_STATE_CAR Loading Loading @@ -3878,7 +3878,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { } private void updateKeyboardVisibility() { mPowerManager.setKeyboardVisibility(mLidOpen == LID_OPEN); mPowerManager.setKeyboardVisibility(mLidState == LID_OPEN); } void updateRotation(boolean alwaysSendConfiguration) { Loading Loading @@ -4132,7 +4132,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { pw.print(prefix); pw.print("mSafeMode="); pw.print(mSafeMode); pw.print(" mSystemReady="); pw.print(mSystemReady); pw.print(" mSystemBooted="); pw.println(mSystemBooted); pw.print(prefix); pw.print("mLidOpen="); pw.print(mLidOpen); pw.print(prefix); pw.print("mLidState="); pw.print(mLidState); pw.print(" mLidOpenRotation="); pw.print(mLidOpenRotation); pw.print(" mHdmiPlugged="); pw.println(mHdmiPlugged); if (mLastSystemUiFlags != 0 || mResettingSystemUiFlags != 0 Loading Loading
core/res/res/values/config.xml +5 −4 Original line number Diff line number Diff line Loading @@ -323,8 +323,9 @@ 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> <!-- The number of degrees to rotate the display when the keyboard is open. A value of -1 means no change in orientation by default. --> <integer name="config_lidOpenRotation">-1</integer> <!-- The number of degrees to rotate the display when the device is in a desk dock. A value of -1 means no change in orientation by default. --> Loading Loading @@ -370,8 +371,8 @@ <!-- Indicate whether the lid state impacts the accessibility of the physical keyboard. 0 means it doesn't, 1 means it is accessible when the lid is open, 2 means it is accessible when the lid is closed. The default is 1. --> <integer name="config_lidKeyboardAccessibility">1</integer> closed. The default is 0. --> <integer name="config_lidKeyboardAccessibility">0</integer> <!-- Indicate whether the lid state impacts the accessibility of the physical keyboard. 0 means it doesn't, 1 means it is accessible Loading
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +9 −9 Original line number Diff line number Diff line Loading @@ -327,7 +327,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { RecentApplicationsDialog mRecentAppsDialog; int mRecentAppsDialogHeldModifiers; int mLidOpen = LID_ABSENT; int mLidState = LID_ABSENT; boolean mSystemReady; boolean mSystemBooted; Loading Loading @@ -1225,16 +1225,16 @@ public class PhoneWindowManager implements WindowManagerPolicy { } void readLidState() { mLidOpen = mWindowManagerFuncs.getLidState(); mLidState = mWindowManagerFuncs.getLidState(); } private int determineHiddenState(int mode, int hiddenValue, int visibleValue) { if (mLidOpen != LID_ABSENT) { if (mLidState != LID_ABSENT) { switch (mode) { case 1: return mLidOpen == LID_OPEN ? visibleValue : hiddenValue; return mLidState == LID_OPEN ? visibleValue : hiddenValue; case 2: return mLidOpen == LID_OPEN ? hiddenValue : visibleValue; return mLidState == LID_OPEN ? hiddenValue : visibleValue; } } return visibleValue; Loading Loading @@ -2797,7 +2797,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { if (mHeadless) return; // lid changed state mLidOpen = lidOpen ? LID_OPEN : LID_CLOSED; mLidState = lidOpen ? LID_OPEN : LID_CLOSED; updateKeyboardVisibility(); boolean awakeNow = mKeyguardMediator.doLidChangeTq(lidOpen); Loading Loading @@ -3486,7 +3486,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { } final int preferredRotation; if (mLidOpen == LID_OPEN && mLidOpenRotation >= 0) { if (mLidState == LID_OPEN && mLidOpenRotation >= 0) { // Ignore sensor when lid switch is open and rotation is forced. preferredRotation = mLidOpenRotation; } else if (mDockMode == Intent.EXTRA_DOCK_STATE_CAR Loading Loading @@ -3878,7 +3878,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { } private void updateKeyboardVisibility() { mPowerManager.setKeyboardVisibility(mLidOpen == LID_OPEN); mPowerManager.setKeyboardVisibility(mLidState == LID_OPEN); } void updateRotation(boolean alwaysSendConfiguration) { Loading Loading @@ -4132,7 +4132,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { pw.print(prefix); pw.print("mSafeMode="); pw.print(mSafeMode); pw.print(" mSystemReady="); pw.print(mSystemReady); pw.print(" mSystemBooted="); pw.println(mSystemBooted); pw.print(prefix); pw.print("mLidOpen="); pw.print(mLidOpen); pw.print(prefix); pw.print("mLidState="); pw.print(mLidState); pw.print(" mLidOpenRotation="); pw.print(mLidOpenRotation); pw.print(" mHdmiPlugged="); pw.println(mHdmiPlugged); if (mLastSystemUiFlags != 0 || mResettingSystemUiFlags != 0 Loading