|
|
@ -32,15 +32,19 @@ class WebTileService : TileService() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { |
|
|
|
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { |
|
|
|
when (intent?.action) { |
|
|
|
try { |
|
|
|
IntentAction.start -> { |
|
|
|
when (intent?.action) { |
|
|
|
qsTile.state = Tile.STATE_ACTIVE |
|
|
|
IntentAction.start -> { |
|
|
|
qsTile.updateTile() |
|
|
|
qsTile.state = Tile.STATE_ACTIVE |
|
|
|
} |
|
|
|
qsTile.updateTile() |
|
|
|
IntentAction.stop -> { |
|
|
|
} |
|
|
|
qsTile.state = Tile.STATE_INACTIVE |
|
|
|
IntentAction.stop -> { |
|
|
|
qsTile.updateTile() |
|
|
|
qsTile.state = Tile.STATE_INACTIVE |
|
|
|
|
|
|
|
qsTile.updateTile() |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} catch (e: Exception) { |
|
|
|
|
|
|
|
e.printStackTrace() |
|
|
|
} |
|
|
|
} |
|
|
|
return super.onStartCommand(intent, flags, startId) |
|
|
|
return super.onStartCommand(intent, flags, startId) |
|
|
|
} |
|
|
|
} |
|
|
|