summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcore/res/res/values/config.xml9
-rwxr-xr-xpolicy/src/com/android/internal/policy/impl/PhoneWindowManager.java18
2 files changed, 14 insertions, 13 deletions
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 31aa8d5..acf63a1 100755
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -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. -->
@@ -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
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index d150b5c..1891146 100755
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -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;
@@ -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;
@@ -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);
@@ -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
@@ -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) {
@@ -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