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

Commit e12931f6 authored by John Spurlock's avatar John Spurlock Committed by Android (Google) Code Review
Browse files

Merge "DNDTile: Notify of value changes." into mnc-dev

parents c5a142f8 b1688f6a
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -102,7 +102,9 @@ public class DndTile extends QSTile<QSTile.BooleanState> {
    @Override
    protected void handleUpdateState(BooleanState state, Object arg) {
        final int zen = arg instanceof Integer ? (Integer) arg : mController.getZen();
        state.value = zen != Global.ZEN_MODE_OFF;
        final boolean newValue = zen != Global.ZEN_MODE_OFF;
        final boolean valueChanged = state.value != newValue;
        state.value = newValue;
        state.visible = isVisible(mContext);
        switch (zen) {
            case Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS:
@@ -133,6 +135,9 @@ public class DndTile extends QSTile<QSTile.BooleanState> {
        if (mShowingDetail && !state.value) {
            showDetail(false);
        }
        if (valueChanged) {
            fireToggleStateChanged(state.value);
        }
    }

    @Override