summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorNicolas Prevot <nprevot@google.com>2015-06-26 13:45:12 -0700
committerNicolas Prevot <nprevot@google.com>2015-06-26 14:07:39 -0700
commitb6830197450d5a2befaf0dc4f7e73850f4c55846 (patch)
tree615d650614292003c33bc55effd752150d56692b /services
parent5869363b06dc81b83cff7e75ffd48559938915fc (diff)
downloadframeworks_base-b6830197450d5a2befaf0dc4f7e73850f4c55846.zip
frameworks_base-b6830197450d5a2befaf0dc4f7e73850f4c55846.tar.gz
frameworks_base-b6830197450d5a2befaf0dc4f7e73850f4c55846.tar.bz2
Add flag FLAG_ACTIVITY_RESET_TASK_IF_NEEDED in LauncherAppsService.
Without this fix: When starting an activity that was an activity-alias, in the work profile: If this activity was already running, it caused the activity to be created a second time instead of restarting the first one. BUG:21411331 Change-Id: Ieb323885c589caed2675765cd5eed8c311535b92
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/pm/LauncherAppsService.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/pm/LauncherAppsService.java b/services/core/java/com/android/server/pm/LauncherAppsService.java
index d787919..4582828 100644
--- a/services/core/java/com/android/server/pm/LauncherAppsService.java
+++ b/services/core/java/com/android/server/pm/LauncherAppsService.java
@@ -271,7 +271,8 @@ public class LauncherAppsService extends SystemService {
Intent launchIntent = new Intent(Intent.ACTION_MAIN);
launchIntent.addCategory(Intent.CATEGORY_LAUNCHER);
launchIntent.setSourceBounds(sourceBounds);
- launchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ launchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK
+ | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
launchIntent.setPackage(component.getPackageName());
long ident = Binder.clearCallingIdentity();
@@ -470,4 +471,4 @@ public class LauncherAppsService extends SystemService {
}
}
}
-} \ No newline at end of file
+}