Do not update tile state when unsure

This commit is contained in:
Mygod
2018-12-25 12:57:25 +08:00
parent 36b0284573
commit b2534eb2c0
6 changed files with 35 additions and 25 deletions

View File

@@ -48,7 +48,7 @@ class LocalOnlyHotspotTileService : TetherListeningTileService() {
override fun updateTile() {
qsTile?.run {
state = if (binder?.iface == null) Tile.STATE_INACTIVE else Tile.STATE_ACTIVE
state = if ((binder ?: return).iface == null) Tile.STATE_INACTIVE else Tile.STATE_ACTIVE
icon = tile
label = getText(R.string.tethering_temp_hotspot)
updateTile()