mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-11-15 08:42:57 +00:00
android: ForegroundService: Handle null intent.
This commit is contained in:
parent
17ae85e724
commit
9ca8687b5f
|
@ -52,7 +52,10 @@ class ForegroundService : Service() {
|
|||
showRunningNotification()
|
||||
}
|
||||
|
||||
override fun onStartCommand(intent: Intent, flags: Int, startId: Int): Int {
|
||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
||||
if (intent == null) {
|
||||
return START_NOT_STICKY;
|
||||
}
|
||||
if (intent.action == ACTION_STOP) {
|
||||
NotificationManagerCompat.from(this).cancel(EMULATION_RUNNING_NOTIFICATION)
|
||||
stopForeground(STOP_FOREGROUND_REMOVE)
|
||||
|
|
Loading…
Reference in a new issue