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

Commit b1688f6a authored by John Spurlock's avatar John Spurlock
Browse files

DNDTile: Notify of value changes.

Bug: 21055789
Change-Id: If9008b13a6a5583832fc4dfaa8ec3e21b61cb25c
parent e74d5d09
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