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

Commit ad4624b1 authored by Adam Powell's avatar Adam Powell
Browse files

Port Ic9d9d65c66325904c95ab3966bdcc16e7668278b to oc-dev

Port the previous change that was merged DO NOT MERGE for an upstream
branch that filters non-exported activities from ResolverActivity.

Bug: 34147053
Test: by previous CL
Change-Id: I2d0a018afd5e9c876f82fc5f551f1edc4b2305c8
parent add77afe
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -99,6 +99,14 @@ public class ResolverListController {
                            | (shouldGetResolvedFilter ? PackageManager.GET_RESOLVED_FILTER : 0)
                            | (shouldGetResolvedFilter ? PackageManager.GET_RESOLVED_FILTER : 0)
                            | (shouldGetActivityMetadata ? PackageManager.GET_META_DATA : 0)
                            | (shouldGetActivityMetadata ? PackageManager.GET_META_DATA : 0)
                            | PackageManager.MATCH_INSTANT);
                            | PackageManager.MATCH_INSTANT);
            // Remove any activities that are not exported.
            int totalSize = infos.size();
            for (int j = totalSize - 1; j >= 0 ; j--) {
                ResolveInfo info = infos.get(j);
                if (info.activityInfo != null && !info.activityInfo.exported) {
                    infos.remove(j);
                }
            }
            if (infos != null) {
            if (infos != null) {
                if (resolvedComponents == null) {
                if (resolvedComponents == null) {
                    resolvedComponents = new ArrayList<>();
                    resolvedComponents = new ArrayList<>();