DevicePolicyManager.clearPackagePersistentPreferredActivities 中的 PackageName(ComponentName admin,String packageName)

PackageName in DevicePolicyManager.clearPackagePersistentPreferredActivities(ComponentName admin,String packageName)

DevicePolicyManager.clearPackagePersistentPreferredActivities(ComponentName admin,String packageName)中的packageName代表什么?是admin的包名还是addPersistentPreferredActivity(ComponentName, IntentFilter, ComponentName)的activity中的包名?

来自此处的官方文档: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).

所以这是你问题的后一个。