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

Commit 4066bfd8 authored by Alex Buynytskyy's avatar Alex Buynytskyy Committed by Android (Google) Code Review
Browse files

Merge "Allow visibility to one more activity-related API." into main

parents 45c41da4 e7b28a5d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -895,6 +895,9 @@ public class ComputerEngine implements Computer {
            @PackageManager.ResolveInfoFlagsBits long flags, int filterCallingUid, int userId) {
        ParsedActivity a = mComponentResolver.getActivity(component);

        // Allow to match activities of quarantined packages.
        flags |= PackageManager.MATCH_QUARANTINED_COMPONENTS;

        if (DEBUG_PACKAGE_INFO) Log.v(TAG, "getActivityInfo " + component + ": " + a);

        AndroidPackage pkg = a == null ? null : mPackages.get(a.getPackageName());
+5 −2
Original line number Diff line number Diff line
@@ -266,17 +266,20 @@ public class PackageInfoUtils {
        if ((flags & PackageManager.GET_ACTIVITIES) != 0) {
            final int N = pkg.getActivities().size();
            if (N > 0) {
                // Allow to match activities of quarantined packages.
                long aflags = flags | PackageManager.MATCH_QUARANTINED_COMPONENTS;

                int num = 0;
                final ActivityInfo[] res = new ActivityInfo[N];
                for (int i = 0; i < N; i++) {
                    final ParsedActivity a = pkg.getActivities().get(i);
                    if (ComponentParseUtils.isMatch(state, pkgSetting.isSystem(), pkg.isEnabled(), a,
                            flags)) {
                            aflags)) {
                        if (PackageManager.APP_DETAILS_ACTIVITY_CLASS_NAME.equals(
                                a.getName())) {
                            continue;
                        }
                        res[num++] = generateActivityInfo(pkg, a, flags, state,
                        res[num++] = generateActivityInfo(pkg, a, aflags, state,
                                applicationInfo, userId, pkgSetting);
                    }
                }