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

Commit 6d11da5b authored by Matías Hernández's avatar Matías Hernández
Browse files

Fix NPE when checking whether a rule is implicit

Rule id should not be null, but seems to be in some cases nevertheless.

Fixes: 379339779
Test: atest ZenModeHelperTest
Flag: EXEMPT Bugxix
Change-Id: I998d92e1f447b0fda9034adc0239f908dd87343b
parent 63034454
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2532,7 +2532,7 @@ public class ZenModeConfig implements Parcelable {

    /** Returns whether the rule id corresponds to an implicit rule. */
    public static boolean isImplicitRuleId(@NonNull String ruleId) {
        return ruleId.startsWith(IMPLICIT_RULE_ID_PREFIX);
        return ruleId != null && ruleId.startsWith(IMPLICIT_RULE_ID_PREFIX);
    }

    private static int[] tryParseHourAndMinute(String value) {