android: Disable foreground service

This commit is contained in:
GPUCode 2024-04-06 12:40:48 +03:00
parent ffe0632608
commit 0cc094e7c8

View file

@ -86,8 +86,8 @@ class EmulationActivity : AppCompatActivity() {
) )
// Start a foreground service to prevent the app from getting killed in the background // Start a foreground service to prevent the app from getting killed in the background
foregroundService = Intent(this, ForegroundService::class.java) //foregroundService = Intent(this, ForegroundService::class.java)
startForegroundService(foregroundService) //startForegroundService(foregroundService)
EmulationLifecycleUtil.addShutdownHook(hook = { this.finish() }) EmulationLifecycleUtil.addShutdownHook(hook = { this.finish() })
} }
@ -112,7 +112,7 @@ class EmulationActivity : AppCompatActivity() {
override fun onDestroy() { override fun onDestroy() {
EmulationLifecycleUtil.clear() EmulationLifecycleUtil.clear()
stopForegroundService(this) //stopForegroundService(this)
super.onDestroy() super.onDestroy()
} }