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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user