Android-x86
Fork
Faire un don

  • R/O
  • HTTP
  • SSH
  • HTTPS

frameworks-policies-base: Commit

frameworks/policies/base


Commit MetaInfo

Révision9fb8be56f2470838346d0125f4220a5ce4760b7f (tree)
l'heure2011-01-31 19:02:09
AuteurPatrick Ferguson <padraigf65@gmai...>
CommiterChih-Wei Huang

Message de Log

PhoneWindowManager: disable softkeyboard by default

Change-Id: I7126ce887991ad3726b4770b79a53f5a367d2ff5

Change Summary

Modification

--- a/phone/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/phone/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -272,17 +272,15 @@ public class PhoneWindowManager implements WindowManagerPolicy {
272272 // Nothing to see here, move along...
273273 int mFancyRotationAnimation;
274274
275- static boolean mFirstAdjustSoftkeyboard = true;
276-
277275 ShortcutManager mShortcutManager;
278276 PowerManager.WakeLock mBroadcastWakeLock;
279277
280278 int lastKeyCode = KeyEvent.getMaxKeyCode() + 1; //invalid code
281279 int keyRepeatCount = 0;
282280
283- private boolean isSoftKeyBoardEnable() {
281+ private boolean isSoftKeyBoardDisabled() {
284282 return Settings.System.getInt(mContext.getContentResolver(),
285- Settings.System.SOFTKEYBOARD, 0) != 0;
283+ Settings.System.SOFTKEYBOARD, 1) != 1;
286284 }
287285
288286 class SettingsObserver extends ContentObserver {
@@ -729,25 +727,20 @@ public class PhoneWindowManager implements WindowManagerPolicy {
729727 /** {@inheritDoc} */
730728 public void adjustConfigurationLw(Configuration config) {
731729 readLidState();
732- final boolean lidOpen = !KEYBOARD_ALWAYS_HIDDEN && mLidOpen;
730+ final boolean lidOpen = isSoftKeyBoardDisabled() ||
731+ (!KEYBOARD_ALWAYS_HIDDEN && mLidOpen);
732+
733733 mPowerManager.setKeyboardVisibility(lidOpen);
734- if (mFirstAdjustSoftkeyboard) {
735- Settings.System.putInt(mContext.getContentResolver(),
736- Settings.System.SOFTKEYBOARD, lidOpen ? 0 : 1);
737- } else {
738- config.hardKeyboardHidden = determineHiddenState(isSoftKeyBoardEnable(),
739- mLidKeyboardAccessibility, Configuration.HARDKEYBOARDHIDDEN_NO,
740- Configuration.HARDKEYBOARDHIDDEN_YES);
741- config.navigationHidden = determineHiddenState(isSoftKeyBoardEnable(),
742- mLidNavigationAccessibility, Configuration.NAVIGATIONHIDDEN_NO,
743- Configuration.NAVIGATIONHIDDEN_YES);
744- config.keyboardHidden = (config.hardKeyboardHidden ==
745- Configuration.HARDKEYBOARDHIDDEN_NO || mHasSoftInput)
746- ? Configuration.KEYBOARDHIDDEN_NO
747- : Configuration.KEYBOARDHIDDEN_YES;
748- }
749-
750- mFirstAdjustSoftkeyboard = false;
734+ config.hardKeyboardHidden = determineHiddenState(lidOpen,
735+ mLidKeyboardAccessibility, Configuration.HARDKEYBOARDHIDDEN_NO,
736+ Configuration.HARDKEYBOARDHIDDEN_YES);
737+ config.navigationHidden = determineHiddenState(lidOpen,
738+ mLidNavigationAccessibility, Configuration.NAVIGATIONHIDDEN_NO,
739+ Configuration.NAVIGATIONHIDDEN_YES);
740+ config.keyboardHidden = (config.hardKeyboardHidden ==
741+ Configuration.HARDKEYBOARDHIDDEN_NO || mHasSoftInput)
742+ ? Configuration.KEYBOARDHIDDEN_NO
743+ : Configuration.KEYBOARDHIDDEN_YES;
751744 }
752745
753746 public boolean isCheekPressedAgainstScreen(MotionEvent ev) {
Afficher sur ancien navigateur de dépôt.