masonamerica.platform.PackageManagerPrivileged |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Grant a runtime permission to an application which the application does not
already have.
| |||||||||||
Install an APK from the device storage.
| |||||||||||
Internal API for Mason OS.
| |||||||||||
Uninstall an APK
|
Grant a runtime permission to an application which the application does not
already have. The permission must have been requested by the application.
If the application is not allowed to hold the permission, a SecurityException
is thrown.
Parameters | |
---|---|
packageName |
String : The package to which to grant the permission. |
permissionName |
String : The permission name to grant. |
Install an APK from the device storage.
Parameters | |
---|---|
targetApkUri |
Uri : the Uri to the apk file. Must be readable by other applications. Use Uri format as file:///LOCATION-OF-THE-APP. For example: file:///Downloads/myapp.apk
|
Internal API for Mason OS. Revoke a runtime permission that was previously granted by grantRuntimePermission(java.lang.String, java.lang.String)
for the current user.
The permission must have been requested by and granted to the application.
If the application is not allowed to hold the permission, a SecurityException
is thrown.
Parameters | |
---|---|
packageName |
String : The package from which to revoke the permission. |
permissionName |
String : The permission name to revoke.n. |
Uninstall an APK
Parameters | |
---|---|
packageName |
String : package name of the apk to uninstall. Not valid for system applications.
|