25 lines
742 B
Kotlin
25 lines
742 B
Kotlin
/*
|
|
* SPDX-FileCopyrightText: 2026 Shiham Abdul Rahman <shihaam@shihaam.dev>
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
*/
|
|
|
|
package sh.sar.isodroid.notification
|
|
|
|
import android.content.BroadcastReceiver
|
|
import android.content.Context
|
|
import android.content.Intent
|
|
import kotlinx.coroutines.CoroutineScope
|
|
import kotlinx.coroutines.Dispatchers
|
|
import kotlinx.coroutines.launch
|
|
import sh.sar.isodroid.isodrive.CreateImgEventBus
|
|
|
|
class CreateImgReceiver : BroadcastReceiver() {
|
|
override fun onReceive(context: Context, intent: Intent) {
|
|
if (intent.action == NotificationHelper.ACTION_CANCEL_CREATE) {
|
|
CoroutineScope(Dispatchers.Main).launch {
|
|
CreateImgEventBus.cancel()
|
|
}
|
|
}
|
|
}
|
|
}
|