Declare location permission used by foreground properly

Fix #132.
This commit is contained in:
Mygod
2019-10-24 12:15:36 +08:00
parent 13c43f9b0e
commit e790e513e1
3 changed files with 13 additions and 6 deletions

View File

@@ -35,8 +35,8 @@ class RepeaterTileService : KillableTileService() {
val binder = binder
if (binder == null) tapPending = true else when (binder.service.status) {
RepeaterService.Status.ACTIVE -> binder.shutdown()
RepeaterService.Status.IDLE ->
ContextCompat.startForegroundService(this, Intent(this, RepeaterService::class.java))
RepeaterService.Status.IDLE -> ContextCompat.startForegroundService(this,
Intent(this, RepeaterService::class.java).putExtra(RepeaterService.EXTRA_POSSIBLY_BACKGROUND, true))
else -> { }
}
}