diff --git a/services/core/java/com/android/server/pm/LauncherAppsService.java b/services/core/java/com/android/server/pm/LauncherAppsService.java index b06b58385cc31..1717b3d1a5f79 100644 --- a/services/core/java/com/android/server/pm/LauncherAppsService.java +++ b/services/core/java/com/android/server/pm/LauncherAppsService.java @@ -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; diff --git a/services/core/java/com/android/server/pm/crossprofile/CrossProfileAppsServiceImpl.java b/services/core/java/com/android/server/pm/crossprofile/CrossProfileAppsServiceImpl.java index d6281c51b3faa..a517d6d1a99e6 100644 --- a/services/core/java/com/android/server/pm/crossprofile/CrossProfileAppsServiceImpl.java +++ b/services/core/java/com/android/server/pm/crossprofile/CrossProfileAppsServiceImpl.java @@ -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);