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

Commit dd4f6314 authored by Jeffrey Huang's avatar Jeffrey Huang
Browse files

Fix InvalidProtoWireException

The NPE here would catch in the outer try-catch causing the end object
token to not be written by ProtoOutputStream

Bug: 187098431
Test: atest IncidentdTest#testIncidentReportDumpLocal
Change-Id: I65fb92c077e246aaf2ae902b545fea38dd667e25
parent aa4fa808
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -659,7 +659,8 @@ public class ZenModeHelper {
                mConfig.manualRule.dumpDebug(proto, ZenModeProto.ENABLED_ACTIVE_CONDITIONS);
            }
            for (ZenRule rule : mConfig.automaticRules.values()) {
                if (rule.enabled && rule.condition.state == Condition.STATE_TRUE
                if (rule.enabled && rule.condition != null
                        && rule.condition.state == Condition.STATE_TRUE
                        && !rule.snoozing) {
                    rule.dumpDebug(proto, ZenModeProto.ENABLED_ACTIVE_CONDITIONS);
                }