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

Commit c5bfd5f5 authored by Fan Zhang's avatar Fan Zhang Committed by Android (Google) Code Review
Browse files

Merge "Fix NPE when trying to refreshes dnd condition." into nyc-mr1-dev

parents 3843dd96 98487f4d
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -139,8 +139,11 @@ public class DndCondition extends Condition {
        public void onReceive(Context context, Intent intent) {
            if (NotificationManager.ACTION_INTERRUPTION_FILTER_CHANGED_INTERNAL
                    .equals(intent.getAction())) {
                ConditionManager.get(context).getCondition(DndCondition.class)
                        .refreshState();
                final Condition condition =
                        ConditionManager.get(context).getCondition(DndCondition.class);
                if (condition != null) {
                    condition.refreshState();
                }
            }
        }
    }