mirror of
https://github.com/awfixers-stuff/OwnDroid.git
synced 2026-03-23 19:15:58 +00:00
catch error when using Dhizuku API
This commit is contained in:
@@ -32,7 +32,7 @@ class Receiver : DeviceAdminReceiver() {
|
||||
super.onEnabled(context, intent)
|
||||
val dpm = context.getDPM()
|
||||
val receiver = ComponentName(context, this::class.java)
|
||||
if(dpm.isAdminActive(receiver) || dpm.isProfileOwner(context) || dpm.isDeviceOwner(context)){
|
||||
if(dpm.isAdminActive(receiver) || context.isProfileOwner || context.isDeviceOwner){
|
||||
Toast.makeText(context, context.getString(R.string.onEnabled), Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user