- info
- Description of the permission to be added.
Documentation for this section has not yet been entered.
Type Reason Java.Lang.SecurityException if you are not allowed to add the given permission name.
Add a new dynamic permission to the system. For this to work, your package must have defined a permission tree through the NoType:android/R$styleable;Href=../../../../reference/android/R.styleable.html#AndroidManifestPermissionTree tag in its manifest. A package can only add permissions to trees that were defined by either its own package or another with the same user id; a permission is in a tree if it matches the name of the permission tree + ".": for example, "com.foo.bar" is a member of the permission tree "com.foo".
It is good to make your permission tree name descriptive, because you are taking possession of that entire set of permission names. Thus, it must be under a domain you control, with a suffix that will not match any normal permissions that may be declared in any applications that are part of that domain.
New permissions must be added before any .apks are installed that use those permissions. Permissions you add through this method are remembered across reboots of the device. If the given permission already exists, the info you supply here will be used to update it.