forked from MarcoBuster/Magisk
18 lines
520 B
Kotlin
18 lines
520 B
Kotlin
package com.topjohnwu.magisk.base
|
|
|
|
import android.content.BroadcastReceiver
|
|
import android.content.Context
|
|
import android.content.ContextWrapper
|
|
import android.content.Intent
|
|
import com.topjohnwu.magisk.wrap
|
|
import org.koin.core.KoinComponent
|
|
|
|
abstract class BaseReceiver : BroadcastReceiver(), KoinComponent {
|
|
|
|
final override fun onReceive(context: Context, intent: Intent?) {
|
|
onReceive(context.wrap() as ContextWrapper, intent)
|
|
}
|
|
|
|
abstract fun onReceive(context: ContextWrapper, intent: Intent?)
|
|
}
|