diff options
author | Craig Mautner <cmautner@google.com> | 2014-06-19 11:19:20 -0700 |
---|---|---|
committer | Craig Mautner <cmautner@google.com> | 2014-06-23 15:04:23 -0700 |
commit | 84984faf530e525b066e28710d0f9beb32142ec5 (patch) | |
tree | e40fb7ff9a9515c7450f0d8e2730379abb5124ad /policy/src | |
parent | 61606cec5ceb705910dec94222b22e66a0365094 (diff) | |
download | frameworks_base-84984faf530e525b066e28710d0f9beb32142ec5.zip frameworks_base-84984faf530e525b066e28710d0f9beb32142ec5.tar.gz frameworks_base-84984faf530e525b066e28710d0f9beb32142ec5.tar.bz2 |
Return to recents when coming from recents
If a task is launched from recents then backing all the way
out of the task will return you to recents. Entering the task
in any other way (home, another activity, nav bar) will reset
this behavior.
Fixes bug 15703876.
Change-Id: I98dc36e4dbcb238d59e2175832076de7225bfdd9
Diffstat (limited to 'policy/src')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/PhoneWindowManager.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java index 637061d..7f13132 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -521,6 +521,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { private static final int MSG_KEYGUARD_DRAWN_TIMEOUT = 6; private static final int MSG_WINDOW_MANAGER_DRAWN_COMPLETE = 7; private static final int MSG_WAKING_UP = 8; + private static final int MSG_DISPATCH_SHOW_RECENTS = 9; private class PolicyHandler extends Handler { @Override @@ -538,6 +539,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { case MSG_DISPATCH_MEDIA_KEY_REPEAT_WITH_WAKE_LOCK: dispatchMediaKeyRepeatWithWakeLock((KeyEvent)msg.obj); break; + case MSG_DISPATCH_SHOW_RECENTS: + showRecentApps(false); + break; case MSG_KEYGUARD_DRAWN_COMPLETE: if (DEBUG_WAKEUP) Slog.w(TAG, "Setting mKeyguardDrawComplete"); mKeyguardDrawComplete = true; @@ -2589,6 +2593,12 @@ public class PhoneWindowManager implements WindowManagerPolicy { } } + @Override + public void showRecentApps() { + mHandler.removeMessages(MSG_DISPATCH_SHOW_RECENTS); + mHandler.sendEmptyMessage(MSG_DISPATCH_SHOW_RECENTS); + } + private void showRecentApps(boolean triggeredFromAltTab) { mPreloadedRecentApps = false; // preloading no longer needs to be canceled try { |