DndTile: Avoid NPE during boot phase
* Listening handling can only take place once mController is properly initialized. Change-Id: Icbef2d506417f132e1ab47e23d457dacb9c00146
This commit is contained in:
@@ -235,6 +235,7 @@ public class DndTile extends QSTileImpl<BooleanState> {
|
||||
public void handleSetListening(boolean listening) {
|
||||
if (mListening == listening) return;
|
||||
mListening = listening;
|
||||
if (mController == null) return;
|
||||
if (mListening) {
|
||||
mController.addCallback(mZenCallback);
|
||||
Prefs.registerListener(mContext, mPrefListener);
|
||||
|
||||
Reference in New Issue
Block a user