NfcTile: Don't create an error when editing tiles
Repro: * Make sure no NfcTile is in your expanded QS (not tested what happens if it's there) * Hit the Edit-button: Error in handleSetListeningInternal java.lang.IllegalArgumentException: Receiver not registered: com.android.systemui.qs.tiles.NfcTile$1@7c00b87 at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:1434) at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:1543) at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:664) at com.android.systemui.qs.tiles.NfcTile.handleSetListening(NfcTile.java:64) at com.android.systemui.qs.tileimpl.QSTileImpl.handleSetListeningInternal(QSTileImpl.java:371) at com.android.systemui.qs.tileimpl.QSTileImpl.access$700(QSTileImpl.java:80) at com.android.systemui.qs.tileimpl.QSTileImpl$H.handleMessage(QSTileImpl.java:496) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:214) at android.os.HandlerThread.run(HandlerThread.java:67) * Only register or unregister the receiver if we actually need to change registered-state * Same code is in AirPlaneModeToggle.java, presumably was also added to prevent unnecessary registering/unregistering Change-Id: I6cd8f9bffccb68596b736cc0a3a38e9c12b9c489
Loading
Please register or sign in to comment