diff options
author | Jeff Brown <jeffbrown@google.com> | 2013-06-05 15:06:20 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-06-05 15:06:20 -0700 |
commit | 16f6b1514d7a067e3b718c58fd9e37a58b6e8eec (patch) | |
tree | 0fec75e1b981575d03fb7637ebf1b122dfe08cee /policy | |
parent | 436a1c651a21551ddcd0384c628210116c9a2622 (diff) | |
parent | b093ea59fec05d3644a8dfbeda90c635f04a88fc (diff) | |
download | frameworks_base-16f6b1514d7a067e3b718c58fd9e37a58b6e8eec.zip frameworks_base-16f6b1514d7a067e3b718c58fd9e37a58b6e8eec.tar.gz frameworks_base-16f6b1514d7a067e3b718c58fd9e37a58b6e8eec.tar.bz2 |
am b093ea59: am f8038bdd: Merge "Fix regression in long-press home behavior on tablets." into jb-mr2-dev
* commit 'b093ea59fec05d3644a8dfbeda90c635f04a88fc':
Fix regression in long-press home behavior on tablets.
Diffstat (limited to 'policy')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/PhoneWindowManager.java | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java index b8a9797..6272ab2 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -898,20 +898,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { com.android.internal.R.integer.config_lidNavigationAccessibility); mLidControlsSleep = mContext.getResources().getBoolean( com.android.internal.R.bool.config_lidControlsSleep); - - mLongPressOnHomeBehavior = mContext.getResources().getInteger( - com.android.internal.R.integer.config_longPressOnHomeBehavior); - if (mLongPressOnHomeBehavior < LONG_PRESS_HOME_NOTHING || - mLongPressOnHomeBehavior > LONG_PRESS_HOME_ASSIST) { - mLongPressOnHomeBehavior = LONG_PRESS_HOME_NOTHING; - } - - mDoubleTapOnHomeBehavior = mContext.getResources().getInteger( - com.android.internal.R.integer.config_doubleTapOnHomeBehavior); - if (mDoubleTapOnHomeBehavior < DOUBLE_TAP_HOME_NOTHING || - mDoubleTapOnHomeBehavior > DOUBLE_TAP_HOME_RECENT_SYSTEM_UI) { - mDoubleTapOnHomeBehavior = LONG_PRESS_HOME_NOTHING; - } + readConfigurationDependentBehaviors(); // register for dock events IntentFilter filter = new IntentFilter(); @@ -996,6 +983,27 @@ public class PhoneWindowManager implements WindowManagerPolicy { } } + /** + * Read values from config.xml that may be overridden depending on + * the configuration of the device. + * eg. Disable long press on home goes to recents on sw600dp. + */ + private void readConfigurationDependentBehaviors() { + mLongPressOnHomeBehavior = mContext.getResources().getInteger( + com.android.internal.R.integer.config_longPressOnHomeBehavior); + if (mLongPressOnHomeBehavior < LONG_PRESS_HOME_NOTHING || + mLongPressOnHomeBehavior > LONG_PRESS_HOME_ASSIST) { + mLongPressOnHomeBehavior = LONG_PRESS_HOME_NOTHING; + } + + mDoubleTapOnHomeBehavior = mContext.getResources().getInteger( + com.android.internal.R.integer.config_doubleTapOnHomeBehavior); + if (mDoubleTapOnHomeBehavior < DOUBLE_TAP_HOME_NOTHING || + mDoubleTapOnHomeBehavior > DOUBLE_TAP_HOME_RECENT_SYSTEM_UI) { + mDoubleTapOnHomeBehavior = LONG_PRESS_HOME_NOTHING; + } + } + @Override public void setInitialDisplaySize(Display display, int width, int height, int density) { if (display.getDisplayId() != Display.DEFAULT_DISPLAY) { @@ -1374,6 +1382,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { int navigationPresence) { mHaveBuiltInKeyboard = (keyboardPresence & PRESENCE_INTERNAL) != 0; + readConfigurationDependentBehaviors(); readLidState(); applyLidSwitchState(); |