count receivers in hasTooManyComponents

Receivers should be counted separated. Somehow I initially thought they
were included in the activites count.

BUG: 261874702, 214397059
Test: builds
Change-Id: I12adb57a77020928bee1ee751800f09252e97ff9
This commit is contained in:
Songchun Fan
2022-12-18 21:27:43 -08:00
parent 5e6c1919a2
commit 8457db6cf3
2 changed files with 5 additions and 2 deletions

View File

@@ -451,6 +451,9 @@ public interface ParsingPackage {
@NonNull
List<ParsedProvider> getProviders();
@NonNull
List<ParsedActivity> getReceivers();
@NonNull
List<String> getRequestedPermissions();

View File

@@ -824,8 +824,8 @@ public class ParsingPackageUtils {
}
private static boolean hasTooManyComponents(ParsingPackage pkg) {
return pkg.getActivities().size() + pkg.getServices().size() + pkg.getProviders().size()
> MAX_NUM_COMPONENTS;
return (pkg.getActivities().size() + pkg.getServices().size() + pkg.getProviders().size()
+ pkg.getReceivers().size()) > MAX_NUM_COMPONENTS;
}
/**