Added in API level 34

PolicyUpdateResult


class PolicyUpdateResult
kotlin.Any
   ↳ android.app.admin.PolicyUpdateResult

Class containing the reason for the policy (set from DevicePolicyManager) update (e.g. success, failure reasons, etc.). This is passed in to PolicyUpdateReceiver#onPolicySetResult) and PolicyUpdateReceiver#onPolicyChanged).

Summary

Constants
static Int

Result code to indicate that the policy has not been enforced or has changed because another admin has set a conflicting policy on the device.

static Int

Result code to indicate that the policy set by the admin has not been enforced because of a permanent hardware limitation/issue.

static Int

Result code to indicate that the policy set by the admin has not been enforced because the local storage has reached its max limit.

static Int

Result code to indicate that the policy has not been enforced or has changed for an unknown reason.

static Int

Result code to indicate that the policy set by the admin has been successfully cleared, admins will no longer receive policy updates for this policy after this point.

static Int

Result code to indicate that the policy has been changed to the desired value set by the admin.

Public constructors
PolicyUpdateResult(resultCode: Int)

Constructor for PolicyUpdateResult that takes in a result code describing why the policy has changed.

Public methods
Int

Returns result code describing why the policy has changed.

Constants

RESULT_FAILURE_CONFLICTING_ADMIN_POLICY

Added in API level 34
static val RESULT_FAILURE_CONFLICTING_ADMIN_POLICY: Int

Result code to indicate that the policy has not been enforced or has changed because another admin has set a conflicting policy on the device.

The system will automatically try to enforce the policy when it can without additional calls from the admin.

Value: 1

RESULT_FAILURE_HARDWARE_LIMITATION

Added in API level 34
static val RESULT_FAILURE_HARDWARE_LIMITATION: Int

Result code to indicate that the policy set by the admin has not been enforced because of a permanent hardware limitation/issue.

The system will NOT try to automatically store and enforce this policy again.

Value: 4

RESULT_FAILURE_STORAGE_LIMIT_REACHED

Added in API level 34
static val RESULT_FAILURE_STORAGE_LIMIT_REACHED: Int

Result code to indicate that the policy set by the admin has not been enforced because the local storage has reached its max limit.

The system will NOT try to automatically store and enforce this policy again.

Value: 3

RESULT_FAILURE_UNKNOWN

Added in API level 34
static val RESULT_FAILURE_UNKNOWN: Int

Result code to indicate that the policy has not been enforced or has changed for an unknown reason.

Value: -1

RESULT_POLICY_CLEARED

Added in API level 34
static val RESULT_POLICY_CLEARED: Int

Result code to indicate that the policy set by the admin has been successfully cleared, admins will no longer receive policy updates for this policy after this point.

Note that the policy can still be enforced by some other admin.

Value: 2

RESULT_POLICY_SET

Added in API level 34
static val RESULT_POLICY_SET: Int

Result code to indicate that the policy has been changed to the desired value set by the admin.

Value: 0

Public constructors

Public methods