summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/recent/RecentApplicationsActivity.java11
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/tablet/RecentAppsPanel.java10
2 files changed, 10 insertions, 11 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentApplicationsActivity.java b/packages/SystemUI/src/com/android/systemui/recent/RecentApplicationsActivity.java
index ff2a4ed..a98ef0b 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentApplicationsActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentApplicationsActivity.java
@@ -193,14 +193,13 @@ public class RecentApplicationsActivity extends Activity {
ActivityDescription item = mActivityDescriptions.get(n);
if (item.id >= 0) {
// This is an active task; it should just go to the foreground.
- IActivityManager am = ActivityManagerNative.getDefault();
- try {
- am.moveTaskToFront(item.id);
- } catch (RemoteException e) {
- }
+ final ActivityManager am = (ActivityManager)
+ getSystemService(Context.ACTIVITY_SERVICE);
+ am.moveTaskToFront(item.id, ActivityManager.MOVE_TASK_WITH_HOME);
} else if (item.intent != null) {
// prepare a launch intent and send it
- item.intent.addFlags(Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY);
+ item.intent.addFlags(Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY
+ | Intent.FLAG_ACTIVITY_TASK_ON_HOME);
try {
if (DBG) Log.v(TAG, "Starting intent " + item.intent);
startActivity(item.intent);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/RecentAppsPanel.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/RecentAppsPanel.java
index e0b05f9..0c31304 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/RecentAppsPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/RecentAppsPanel.java
@@ -252,13 +252,13 @@ public class RecentAppsPanel extends LinearLayout implements StatusBarPanel, OnC
ActivityDescription ad = (ActivityDescription)v.getTag();
if (ad.id >= 0) {
// This is an active task; it should just go to the foreground.
- IActivityManager am = ActivityManagerNative.getDefault();
- try {
- am.moveTaskToFront(ad.id);
- } catch (RemoteException e) {
- }
+ final ActivityManager am = (ActivityManager)
+ getContext().getSystemService(Context.ACTIVITY_SERVICE);
+ am.moveTaskToFront(ad.id, ActivityManager.MOVE_TASK_WITH_HOME);
} else {
Intent intent = ad.intent;
+ intent.addFlags(Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY
+ | Intent.FLAG_ACTIVITY_TASK_ON_HOME);
if (DEBUG) Log.v(TAG, "Starting activity " + intent);
getContext().startActivity(intent);
}