Loading core/res/res/values/config.xml +1 −1 Original line number Diff line number Diff line Loading @@ -1041,7 +1041,7 @@ <!-- Control the behavior when the user long presses the home button. 0 - Nothing 1 - Recent apps view in SystemUI 1 - Launch all apps intent 2 - Launch assist intent This needs to match the constants in policy/src/com/android/internal/policy/impl/PhoneWindowManager.java Loading services/core/java/com/android/server/policy/PhoneWindowManager.java +9 −6 Original line number Diff line number Diff line Loading @@ -297,7 +297,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { // These need to match the documentation/constant in // core/res/res/values/config.xml static final int LONG_PRESS_HOME_NOTHING = 0; static final int LONG_PRESS_HOME_RECENT_SYSTEM_UI = 1; static final int LONG_PRESS_HOME_ALL_APPS = 1; static final int LONG_PRESS_HOME_ASSIST = 2; static final int LAST_LONG_PRESS_HOME_BEHAVIOR = LONG_PRESS_HOME_ASSIST; Loading Loading @@ -1700,10 +1700,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { } mHomeConsumed = true; performHapticFeedbackLw(null, HapticFeedbackConstants.LONG_PRESS, false); switch (mLongPressOnHomeBehavior) { case LONG_PRESS_HOME_RECENT_SYSTEM_UI: toggleRecentApps(); case LONG_PRESS_HOME_ALL_APPS: launchAllAppsAction(); break; case LONG_PRESS_HOME_ASSIST: launchAssistAction(null, deviceId); Loading @@ -1714,6 +1713,11 @@ public class PhoneWindowManager implements WindowManagerPolicy { } } private void launchAllAppsAction() { Intent intent = new Intent(Intent.ACTION_ALL_APPS); startActivityAsUser(intent, UserHandle.CURRENT); } private void handleDoubleTapOnHome() { if (mDoubleTapOnHomeBehavior == DOUBLE_TAP_HOME_RECENT_SYSTEM_UI) { mHomeConsumed = true; Loading Loading @@ -3332,8 +3336,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { mHomeDoubleTapPending = false; mHandler.removeCallbacks(mHomeDoubleTapTimeoutRunnable); handleDoubleTapOnHome(); } else if (mLongPressOnHomeBehavior == LONG_PRESS_HOME_RECENT_SYSTEM_UI || mDoubleTapOnHomeBehavior == DOUBLE_TAP_HOME_RECENT_SYSTEM_UI) { } else if (mDoubleTapOnHomeBehavior == DOUBLE_TAP_HOME_RECENT_SYSTEM_UI) { preloadRecentApps(); } } else if ((event.getFlags() & KeyEvent.FLAG_LONG_PRESS) != 0) { Loading Loading
core/res/res/values/config.xml +1 −1 Original line number Diff line number Diff line Loading @@ -1041,7 +1041,7 @@ <!-- Control the behavior when the user long presses the home button. 0 - Nothing 1 - Recent apps view in SystemUI 1 - Launch all apps intent 2 - Launch assist intent This needs to match the constants in policy/src/com/android/internal/policy/impl/PhoneWindowManager.java Loading
services/core/java/com/android/server/policy/PhoneWindowManager.java +9 −6 Original line number Diff line number Diff line Loading @@ -297,7 +297,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { // These need to match the documentation/constant in // core/res/res/values/config.xml static final int LONG_PRESS_HOME_NOTHING = 0; static final int LONG_PRESS_HOME_RECENT_SYSTEM_UI = 1; static final int LONG_PRESS_HOME_ALL_APPS = 1; static final int LONG_PRESS_HOME_ASSIST = 2; static final int LAST_LONG_PRESS_HOME_BEHAVIOR = LONG_PRESS_HOME_ASSIST; Loading Loading @@ -1700,10 +1700,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { } mHomeConsumed = true; performHapticFeedbackLw(null, HapticFeedbackConstants.LONG_PRESS, false); switch (mLongPressOnHomeBehavior) { case LONG_PRESS_HOME_RECENT_SYSTEM_UI: toggleRecentApps(); case LONG_PRESS_HOME_ALL_APPS: launchAllAppsAction(); break; case LONG_PRESS_HOME_ASSIST: launchAssistAction(null, deviceId); Loading @@ -1714,6 +1713,11 @@ public class PhoneWindowManager implements WindowManagerPolicy { } } private void launchAllAppsAction() { Intent intent = new Intent(Intent.ACTION_ALL_APPS); startActivityAsUser(intent, UserHandle.CURRENT); } private void handleDoubleTapOnHome() { if (mDoubleTapOnHomeBehavior == DOUBLE_TAP_HOME_RECENT_SYSTEM_UI) { mHomeConsumed = true; Loading Loading @@ -3332,8 +3336,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { mHomeDoubleTapPending = false; mHandler.removeCallbacks(mHomeDoubleTapTimeoutRunnable); handleDoubleTapOnHome(); } else if (mLongPressOnHomeBehavior == LONG_PRESS_HOME_RECENT_SYSTEM_UI || mDoubleTapOnHomeBehavior == DOUBLE_TAP_HOME_RECENT_SYSTEM_UI) { } else if (mDoubleTapOnHomeBehavior == DOUBLE_TAP_HOME_RECENT_SYSTEM_UI) { preloadRecentApps(); } } else if ((event.getFlags() & KeyEvent.FLAG_LONG_PRESS) != 0) { Loading