What does represent the packageName
in DevicePolicyManager.clearPackagePersistentPreferredActivities(ComponentName admin,String packageName)
? Is it the package name of the admin or is it the package name in of the activity of addPersistentPreferredActivity(ComponentName, IntentFilter, ComponentName)
?
From official docs addressed here: https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#clearPackagePersistentPreferredActivities(android.content.ComponentName,%20java.lang.String)
Called by a profile owner or device owner to remove all persistent intent handler preferences associated with the given package that were set by addPersistentPreferredActivity(ComponentName, IntentFilter, ComponentName).
So it is the later one from your question.