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

Commit 8457db6c authored by Songchun Fan's avatar Songchun Fan
Browse files

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
parent 5e6c1919
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -451,6 +451,9 @@ public interface ParsingPackage {
    @NonNull
    List<ParsedProvider> getProviders();

    @NonNull
    List<ParsedActivity> getReceivers();

    @NonNull
    List<String> getRequestedPermissions();

+2 −2
Original line number Diff line number Diff line
@@ -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;
    }

    /**