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

Commit c154e193 authored by Bruno Martins's avatar Bruno Martins
Browse files

DndTile: Avoid yet another NPE during boot up phase

 * Tile state update can only take place once mController
   is properly initialized.

Change-Id: Ia6c1d6dee7d3e396a5bb6910e03859a0c0cc94ae
parent 00ef20e8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -174,6 +174,7 @@ public class DndTile extends QSTileImpl<BooleanState> {

    @Override
    protected void handleUpdateState(BooleanState state, Object arg) {
        if (mController == null) return;
        final int zen = arg instanceof Integer ? (Integer) arg : mController.getZen();
        final boolean newValue = zen != ZEN_MODE_OFF;
        final boolean valueChanged = state.value != newValue;