pull/1198/head
gedoor 3 years ago
parent 372d7f1776
commit e7715838b7
  1. 20
      app/src/main/java/io/legado/app/service/WebTileService.kt

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

Loading…
Cancel
Save