public
final
class
PolicyUpdateReason
extends Object
Class containing the reason a policy (set from DevicePolicyManager) hasn't been enforced
(passed in to PolicyUpdatesReceiver#onPolicySetResult) or has changed (passed in to
PolicyUpdatesReceiver#onPolicyChanged).
Summary
Constants | |
|---|---|
int |
REASON_CONFLICTING_ADMIN_POLICY
Reason code to indicate that the policy has not been enforced or has changed because another admin has set a conflicting policy on the device. |
int |
REASON_UNKNOWN
Reason code to indicate that the policy has not been enforced or has changed for an unknown reason. |
Public constructors | |
|---|---|
PolicyUpdateReason(int reasonCode)
Constructor for |
|
Public methods | |
|---|---|
int
|
getReasonCode()
Returns reason code for why a policy hasn't been applied or has changed. |
Inherited methods | |||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
From class
| |||||||||||||||||||||||
Constants
REASON_CONFLICTING_ADMIN_POLICY
public static final int REASON_CONFLICTING_ADMIN_POLICY
Reason code to indicate that the policy has not been enforced or has changed because another admin has set a conflicting policy on the device.
Constant Value: 0 (0x00000000)
REASON_UNKNOWN
public static final int REASON_UNKNOWN
Reason code to indicate that the policy has not been enforced or has changed for an unknown reason.
Constant Value: -1 (0xffffffff)
Public constructors
PolicyUpdateReason
public PolicyUpdateReason (int reasonCode)
Constructor for PolicyUpdateReason that takes in a reason code describing why the
policy has changed.
| Parameters | |
|---|---|
reasonCode |
int: Describes why the policy has changed.
Value is either 0 or a combination of REASON_UNKNOWN, and REASON_CONFLICTING_ADMIN_POLICY |
Public methods
getReasonCode
public int getReasonCode ()
Returns reason code for why a policy hasn't been applied or has changed.
| Returns | |
|---|---|
int |
Value is either 0 or a combination of REASON_UNKNOWN, and REASON_CONFLICTING_ADMIN_POLICY |