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

Commit 894cff7c authored by John Spurlock's avatar John Spurlock Committed by Android Git Automerger
Browse files

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

* commit 'e12931f6':
  DNDTile: Notify of value changes.
parents e39a2190 e12931f6
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