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 | |
| Int | Returns the type of validation error associated with this exception. | 
| Unit | writeToParcel(dest: Parcel, flags: Int) | 
| 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
| Return | |
|---|---|
| Int | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0orandroid.os.Parcelable#CONTENTS_FILE_DESCRIPTOR | 
getErrorCode
fun getErrorCode(): Int
Returns the type of validation error associated with this exception.
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
| 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 either0or a combination ofandroid.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES | 
Properties
CREATOR
static val CREATOR: Parcelable.Creator<SystemUpdatePolicy.ValidationFailedException!>
