summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2010-11-22 15:59:56 -0800
committerDianne Hackborn <hackbod@google.com>2010-11-22 18:35:55 -0800
commit621e17de87f18003aba2dedb719a2941020a7902 (patch)
tree978b402ced5bd03d3b4f6eaa9fbaaf186427823c /policy
parent703c5f39c58168829e8d8f7ed7b5aea3f4fb600b (diff)
downloadframeworks_base-621e17de87f18003aba2dedb719a2941020a7902.zip
frameworks_base-621e17de87f18003aba2dedb719a2941020a7902.tar.gz
frameworks_base-621e17de87f18003aba2dedb719a2941020a7902.tar.bz2
Implement issue #3221502: New APIs to support new back stack / task navigation
What this adds: - A new Intent activity flag to completely replace an existing task. - A new Intent activity flag to bring the current home task up behind a new task being started/brought to the foreground. - New versions of startActivity() that take an array of Intents to be started, allowing applications to start a task in a specific state. - A public moveTaskToFront() method on ActivityManager, with a new flag that allows the caller to have the task moved to the front with the current home task immediately behind it. Change-Id: Ie8028d09acffb5349d98043c67676daba09f75c8
Diffstat (limited to 'policy')
-rw-r--r--policy/src/com/android/internal/policy/impl/RecentApplicationsDialog.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/policy/src/com/android/internal/policy/impl/RecentApplicationsDialog.java b/policy/src/com/android/internal/policy/impl/RecentApplicationsDialog.java
index d9e8c2b..f53092d 100644
--- a/policy/src/com/android/internal/policy/impl/RecentApplicationsDialog.java
+++ b/policy/src/com/android/internal/policy/impl/RecentApplicationsDialog.java
@@ -138,13 +138,12 @@ public class RecentApplicationsDialog extends Dialog implements OnClickListener
RecentTag tag = (RecentTag)b.getTag();
if (tag.info.id >= 0) {
// This is an active task; it should just go to the foreground.
- IActivityManager am = ActivityManagerNative.getDefault();
- try {
- am.moveTaskToFront(tag.info.id);
- } catch (RemoteException e) {
- }
+ final ActivityManager am = (ActivityManager)
+ getContext().getSystemService(Context.ACTIVITY_SERVICE);
+ am.moveTaskToFront(tag.info.id, ActivityManager.MOVE_TASK_WITH_HOME);
} else if (tag.intent != null) {
- tag.intent.addFlags(Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY);
+ tag.intent.addFlags(Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY
+ | Intent.FLAG_ACTIVITY_TASK_ON_HOME);
try {
getContext().startActivity(tag.intent);
} catch (ActivityNotFoundException e) {