summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/recent
diff options
context:
space:
mode:
authorAdam Powell <adamp@google.com>2012-07-18 18:20:29 -0700
committerAdam Powell <adamp@google.com>2012-07-19 11:24:47 -0700
commit0fc5b2bea09a6d320884c5b12577caf426f547c1 (patch)
treeb6614d64033a577134faaf1fbdc8db40ef88a5d6 /packages/SystemUI/src/com/android/systemui/recent
parentd2299ca8a28d1185d1dddd1d4832813484276c14 (diff)
downloadframeworks_base-0fc5b2bea09a6d320884c5b12577caf426f547c1.zip
frameworks_base-0fc5b2bea09a6d320884c5b12577caf426f547c1.tar.gz
frameworks_base-0fc5b2bea09a6d320884c5b12577caf426f547c1.tar.bz2
Fun with Up navigation
For activities with a null taskAffinity, simply finish the current task. (They probably shouldn't have specified a parentActivityName anyway.) When launching into app info from ResolverActivity, launch the app info page in the current task with FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET. Back will return to the resolver, and Up will jump to Settings. When launching into app info from RecentsPanelView or BaseStatusBar, since this is a system affordance akin to notifications or widgets, build the full task stack for the app info activity with TaskStackBuilder and launch it as a new task. Change-Id: I73b1941d0f52bd8b30382b5e17edd8ceb058c70d
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/recent')
-rw-r--r--packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
index 0bdf84a..cb69660 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
@@ -21,6 +21,7 @@ import android.animation.LayoutTransition;
import android.app.ActivityManager;
import android.app.ActivityManagerNative;
import android.app.ActivityOptions;
+import android.app.TaskStackBuilder;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
@@ -845,8 +846,9 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener
private void startApplicationDetailsActivity(String packageName) {
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS,
Uri.fromParts("package", packageName, null));
- intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
- getContext().startActivity(intent);
+ intent.setComponent(intent.resolveActivity(mContext.getPackageManager()));
+ TaskStackBuilder.create(getContext())
+ .addNextIntentWithParentStack(intent).startActivities();
}
public boolean onInterceptTouchEvent(MotionEvent ev) {