navigate to home after successfully activate device admin

This commit is contained in:
BinTianqi
2024-05-06 16:33:57 +08:00
parent 3d5f9b949b
commit b71f0dbb8d
4 changed files with 8 additions and 4 deletions

View File

@@ -19,7 +19,6 @@ class Receiver : DeviceAdminReceiver() {
val myComponent = ComponentName(context, this::class.java)
if(myDpm.isAdminActive(myComponent)||isProfileOwner(myDpm)||isDeviceOwner(myDpm)){
Toast.makeText(context, context.getString(R.string.onEnabled), Toast.LENGTH_SHORT).show()
if(myDpm.isAdminActive(myComponent)&&!isProfileOwner(myDpm)&&!isDeviceOwner(myDpm)){ backToHome=true }
}
}