diff options
Diffstat (limited to 'src/android')
| -rw-r--r-- | src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/ForegroundService.kt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/ForegroundService.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/ForegroundService.kt index 626123966..dc9b7c744 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/ForegroundService.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/ForegroundService.kt | |||
| @@ -52,7 +52,10 @@ class ForegroundService : Service() { | |||
| 52 | showRunningNotification() | 52 | showRunningNotification() |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | override fun onStartCommand(intent: Intent, flags: Int, startId: Int): Int { | 55 | override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { |
| 56 | if (intent == null) { | ||
| 57 | return START_NOT_STICKY; | ||
| 58 | } | ||
| 56 | if (intent.action == ACTION_STOP) { | 59 | if (intent.action == ACTION_STOP) { |
| 57 | NotificationManagerCompat.from(this).cancel(EMULATION_RUNNING_NOTIFICATION) | 60 | NotificationManagerCompat.from(this).cancel(EMULATION_RUNNING_NOTIFICATION) |
| 58 | stopForeground(STOP_FOREGROUND_REMOVE) | 61 | stopForeground(STOP_FOREGROUND_REMOVE) |