Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7d0b84e1 authored by Todd Kennedy's avatar Todd Kennedy Committed by android-build-merger
Browse files

Merge "Allow instant app resolution for any user" into oc-dev am: e7b806e9

am: 455b742b

Change-Id: I12b658529a580c1d29e7dc99f60b87ff048706a3
parents ecc3afd4 455b742b
Loading
Loading
Loading
Loading
+18 −16
Original line number Diff line number Diff line
@@ -5721,9 +5721,6 @@ public class PackageManagerService extends IPackageManager.Stub {
            Intent intent, List<ResolveInfo> resolvedActivities, int userId,
            boolean skipPackageCheck) {
        final int callingUser = UserHandle.getCallingUserId();
        if (callingUser != UserHandle.USER_SYSTEM) {
            return false;
        }
        if (mInstantAppResolverConnection == null) {
            return false;
        }
@@ -6334,7 +6331,11 @@ public class PackageManagerService extends IPackageManager.Stub {
                    Slog.v(TAG, "Adding ephemeral installer to the ResolveInfo list");
                }
                final ResolveInfo ephemeralInstaller = new ResolveInfo(mInstantAppInstallerInfo);
                ephemeralInstaller.activityInfo = new ActivityInfo(mInstantAppInstallerActivity);
                final PackageSetting ps =
                        mSettings.mPackages.get(mInstantAppInstallerActivity.packageName);
                if (ps != null) {
                    ephemeralInstaller.activityInfo = PackageParser.generateActivityInfo(
                            mInstantAppInstallerActivity, 0, ps.readUserState(userId), userId);
                    ephemeralInstaller.activityInfo.launchToken = auxiliaryResponse.token;
                    ephemeralInstaller.auxiliaryInfo = auxiliaryResponse;
                    // make sure this resolver is the default
@@ -6348,6 +6349,7 @@ public class PackageManagerService extends IPackageManager.Stub {
                    ephemeralInstaller.instantAppAvailable = true;
                    result.add(ephemeralInstaller);
                }
            }
            Trace.traceEnd(TRACE_TAG_PACKAGE_MANAGER);
        }
        if (sortResult) {