DndTile: Avoid yet another NPE during boot up phase

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

Change-Id: Ia6c1d6dee7d3e396a5bb6910e03859a0c0cc94ae
This commit is contained in:
Bruno Martins
2018-03-17 13:55:42 +00:00
parent 00ef20e853
commit c154e19357

View File

@@ -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;