Merge "Workaround a bug that causes multiple activity instances are created"

This commit is contained in:
TreeHugger Robot
2018-01-16 21:30:21 +00:00
committed by Android (Google) Code Review
2 changed files with 2 additions and 0 deletions

View File

@@ -652,6 +652,7 @@ public class LauncherAppsService extends SystemService {
activityInfo.name.equals(component.getClassName())) {
// Found an activity with category launcher that matches
// this component so ok to launch.
launchIntent.setPackage(null);
launchIntent.setComponent(component);
mContext.startActivityAsUser(launchIntent, opts, user);
return;

View File

@@ -111,6 +111,7 @@ public class CrossProfileAppsServiceImpl extends ICrossProfileApps.Stub {
final long ident = mInjector.clearCallingIdentity();
try {
launchIntent.setPackage(null);
launchIntent.setComponent(component);
mContext.startActivityAsUser(launchIntent,
ActivityOptions.makeOpenCrossProfileAppsAnimation().toBundle(), user);