Merge "Workaround a bug that causes multiple activity instances are created"
This commit is contained in:
committed by
Android (Google) Code Review
commit
619538b7bb
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user