/**@class android.permission.PermissionControllerManager
@extends java.lang.Object

 Interface for communicating with the permission controller.

 @hide
*/
var PermissionControllerManager = {

/** The key for retrieving the result from the returned bundle.

 @hide
*/
KEY_RESULT : "android.permission.PermissionControllerManager.key.result",
/**The permissions are revoked because the apps holding the permissions are malware */
REASON_MALWARE : "1",
/** The permissions are revoked because the apps holding the permissions violate a policy of the
 app that installed it.

 <p>If this reason is used only permissions of apps that are installed by the caller of the
 API can be revoked.
*/
REASON_INSTALLER_POLICY_VIOLATION : "2",
/**Count an app only if the permission is granted to the app. */
COUNT_ONLY_WHEN_GRANTED : "1",
/**Count and app even if it is a system app. */
COUNT_WHEN_SYSTEM : "2",
/**Revoke a set of runtime permissions for various apps.
@param {Object {java.util.Map}} request The permissions to revoke as {@code Map<packageName, List<permission>>}
@param {Boolean} doDryRun Compute the permissions that would be revoked, but not actually revoke them
@param {Number} reason Why the permission should be revoked
@param {Object {Executor}} executor Executor on which to invoke the callback
@param {Object {PermissionControllerManager.OnRevokeRuntimePermissionsCallback}} callback Callback to receive the result
*/
revokeRuntimePermissions : function(  ) {},

/**Set the runtime permission state from a device admin.
@param {String} callerPackageName The package name of the admin requesting the change
@param {String} packageName Package the permission belongs to
@param {String} permission Permission to change
@param {Number} grantState State to set the permission into
@param {Object {Executor}} executor Executor to run the {@code callback} on
@param {Object {java.util.function.Consumer}} callback The callback
@hide 
*/
setRuntimePermissionGrantStateByDeviceAdmin : function(  ) {},

/**Create a backup of the runtime permissions.
@param {Object {UserHandle}} user The user to be backed up
@param {Object {Executor}} executor Executor on which to invoke the callback
@param {Object {PermissionControllerManager.OnGetRuntimePermissionBackupCallback}} callback Callback to receive the result
@hide 
*/
getRuntimePermissionBackup : function(  ) {},

/**Restore a backup of the runtime permissions.
@param {Object {byte[]}} backup the backup to restore. The backup is sent asynchronously, hence it should not
               be modified after calling this method.
@param {Object {UserHandle}} user The user to be restore
@hide 
*/
restoreRuntimePermissionBackup : function(  ) {},

/**Restore a backup of the runtime permissions that has been delayed.
@param {String} packageName The package that is ready to have it's permissions restored.
@param {Object {UserHandle}} user The user to restore
@param {Object {Executor}} executor Executor to execute the callback on
@param {Object {java.util.function.Consumer}} callback Is called with {@code true} iff there is still more delayed backup left
@hide 
*/
restoreDelayedRuntimePermissionBackup : function(  ) {},

/**Gets the runtime permissions for an app.
@param {String} packageName The package for which to query.
@param {Object {PermissionControllerManager.OnGetAppPermissionResultCallback}} callback Callback to receive the result.
@param {Object {Handler}} handler Handler on which to invoke the callback.
@hide 
*/
getAppPermissions : function(  ) {},

/**Revoke the permission {@code permissionName} for app {@code packageName}
@param {String} packageName The package for which to revoke
@param {String} permissionName The permission to revoke
@hide 
*/
revokeRuntimePermission : function(  ) {},

/**Count how many apps have one of a set of permissions.
@param {Object {java.util.List}} permissionNames The permissions the app might have
@param {Number} flags Modify which apps to count. By default all non-system apps that request a
              permission are counted
@param {Object {PermissionControllerManager.OnCountPermissionAppsResultCallback}} callback Callback to receive the result
@param {Object {Handler}} handler Handler on which to invoke the callback
@hide 
*/
countPermissionApps : function(  ) {},

/**Count how many apps have used permissions.
@param {Boolean} countSystem Also count system apps
@param {Number} numMillis The number of milliseconds in the past to check for uses
@param {Object {Executor}} executor Executor on which to invoke the callback
@param {Object {PermissionControllerManager.OnPermissionUsageResultCallback}} callback Callback to receive the result
@hide 
*/
getPermissionUsages : function(  ) {},

/**Grant or upgrade runtime permissions. The upgrade could be performed
 based on whether the device upgraded, whether the permission database
 version is old, or because the permission policy changed.
@param {Object {Executor}} executor Executor on which to invoke the callback
@param {Object {java.util.function.Consumer}} callback Callback to receive the result
@hide 
*/
grantOrUpgradeDefaultRuntimePermissions : function(  ) {},


};