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

Commit bc5b5567 authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge "Merge "Allow any app to dynamically install a split" into oc-dev am:...

Merge "Merge "Allow any app to dynamically install a split" into oc-dev am: 16503a8f am: 20fad610" into oc-dr1-dev-plus-aosp
parents 532ed66c b64f56b2
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -7177,16 +7177,13 @@ public class PackageManagerService extends IPackageManager.Stub
     */
    private List<ResolveInfo> applyPostResolutionFilter(List<ResolveInfo> resolveInfos,
            String ephemeralPkgName) {
        // TODO: When adding on-demand split support for non-instant apps, remove this check
        // and always apply post filtering
        if (ephemeralPkgName == null) {
            return resolveInfos;
        }
        for (int i = resolveInfos.size() - 1; i >= 0; i--) {
            final ResolveInfo info = resolveInfos.get(i);
            final boolean isEphemeralApp = info.activityInfo.applicationInfo.isInstantApp();
            // TODO: When adding on-demand split support for non-instant apps, remove this check
            // and always apply post filtering
            // allow activities that are defined in the provided package
            if (isEphemeralApp && ephemeralPkgName.equals(info.activityInfo.packageName)) {
            if (isEphemeralApp) {
                if (info.activityInfo.splitName != null
                        && !ArrayUtils.contains(info.activityInfo.applicationInfo.splitNames,
                                info.activityInfo.splitName)) {
@@ -7211,6 +7208,10 @@ public class PackageManagerService extends IPackageManager.Stub
                }
                continue;
            }
            // caller is a full app, don't need to apply any other filtering
            if (ephemeralPkgName == null) {
                continue;
            }
            // allow activities that have been explicitly exposed to ephemeral apps
            if (!isEphemeralApp
                    && ((info.activityInfo.flags & ActivityInfo.FLAG_VISIBLE_TO_INSTANT_APP) != 0)) {