Fix crash when tile unconnected

This commit is contained in:
Mygod
2018-02-21 19:53:19 -08:00
parent 13680bd120
commit ab32ae910d

View File

@@ -53,6 +53,7 @@ class RepeaterTileService : TileService(), ServiceConnection {
} }
private fun updateTile() { private fun updateTile() {
val qsTile = qsTile ?: return
when (binder?.service?.status) { when (binder?.service?.status) {
RepeaterService.Status.IDLE -> { RepeaterService.Status.IDLE -> {
qsTile.state = Tile.STATE_INACTIVE qsTile.state = Tile.STATE_INACTIVE