ValidationFailedException
class ValidationFailedException : IllegalArgumentException, Parcelable
| kotlin.Any | |||||
| ↳ | kotlin.Throwable | ||||
| ↳ | java.lang.Exception | ||||
| ↳ | java.lang.RuntimeException | ||||
| ↳ | java.lang.IllegalArgumentException | ||||
| ↳ | android.app.admin.SystemUpdatePolicy.ValidationFailedException | ||||
An exception class that represents various validation errors thrown from SystemUpdatePolicy.setFreezePeriods and DevicePolicyManager.setSystemUpdatePolicy
Summary
| Constants | |
|---|---|
| static Int |
The device has been in a freeze period and some new freeze period to be set is less than 60 days from the end of the last freeze period the device went through. |
| static Int |
The device has been in a freeze period and when combining with the new freeze period to be set, it will result in the total freeze period being longer than 90 days. |
| static Int |
The freeze periods contains duplicates, periods that overlap with each other or periods whose start and end joins. |
| static Int |
There exists some freeze period which starts within 60 days of the preceding period's end time. |
| static Int |
There exists at least one freeze period whose length exceeds 90 days. |
| static Int |
Validation failed with unknown error. |
| Inherited constants | |
|---|---|
| Public methods | |
|---|---|
| Int |
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| Int |
Returns the type of validation error associated with this exception. |
| Unit |
writeToParcel(dest: Parcel, flags: Int)Flatten this object in to a Parcel. |
| Properties | |
|---|---|
| static Parcelable.Creator<SystemUpdatePolicy.ValidationFailedException!> | |
Constants
ERROR_COMBINED_FREEZE_PERIOD_TOO_CLOSE
static val ERROR_COMBINED_FREEZE_PERIOD_TOO_CLOSE: Int
The device has been in a freeze period and some new freeze period to be set is less than 60 days from the end of the last freeze period the device went through.
Value: 6ERROR_COMBINED_FREEZE_PERIOD_TOO_LONG
static val ERROR_COMBINED_FREEZE_PERIOD_TOO_LONG: Int
The device has been in a freeze period and when combining with the new freeze period to be set, it will result in the total freeze period being longer than 90 days.
Value: 5ERROR_DUPLICATE_OR_OVERLAP
static val ERROR_DUPLICATE_OR_OVERLAP: Int
The freeze periods contains duplicates, periods that overlap with each other or periods whose start and end joins.
Value: 2ERROR_NEW_FREEZE_PERIOD_TOO_CLOSE
static val ERROR_NEW_FREEZE_PERIOD_TOO_CLOSE: Int
There exists some freeze period which starts within 60 days of the preceding period's end time.
Value: 4ERROR_NEW_FREEZE_PERIOD_TOO_LONG
static val ERROR_NEW_FREEZE_PERIOD_TOO_LONG: Int
There exists at least one freeze period whose length exceeds 90 days.
Value: 3ERROR_UNKNOWN
static val ERROR_UNKNOWN: Int
Validation failed with unknown error.
Value: 1Public methods
describeContents
fun describeContents(): Int
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(android.os.Parcel,int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.
| Return | |
|---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or
|
getErrorCode
fun getErrorCode(): Int
Returns the type of validation error associated with this exception.
| Return | |
|---|---|
Int |
Value is one of the following: |
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Flatten this object in to a Parcel.
| Parameters | |
|---|---|
dest |
Parcel: The Parcel in which the object should be written. This value cannot be null. |
flags |
Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of the following:
|
Properties
CREATOR
static val CREATOR: Parcelable.Creator<SystemUpdatePolicy.ValidationFailedException!>