Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8993448a authored by Steve Kondik's avatar Steve Kondik Committed by Gerrit Code Review
Browse files

Merge "Change APP_SWITCH key event to open Android 4.0 recent apps switcher" into ics

parents d21a350b 76d2ceab
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -434,6 +434,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
    boolean mHideLockScreen;
    boolean mDismissKeyguard;
    boolean mHomePressed;
    boolean mAppSwitchPressed;
    Intent mHomeIntent;
    Intent mCarDockIntent;
    Intent mDeskDockIntent;
@@ -1760,8 +1761,20 @@ public class PhoneWindowManager implements WindowManagerPolicy {
            }
            return 0;
        } else if (keyCode == KeyEvent.KEYCODE_APP_SWITCH) {
            if (mAppSwitchPressed && !down) {
                mAppSwitchPressed = false;
                if (!canceled && !keyguardOn) {
                    sendCloseSystemWindows(SYSTEM_DIALOG_REASON_RECENT_APPS);
                    try {
                        mStatusBarService.toggleRecentApps();
                    } catch (RemoteException e) {
                    }
                }
                return -1;
            }

            if (down && repeatCount == 0) {
                showOrHideRecentAppsDialog(RECENT_APPS_BEHAVIOR_SHOW_OR_DISMISS);
                mAppSwitchPressed = true;
            }
            return -1;
        } else if (keyCode == KeyEvent.KEYCODE_BACK) {