SystemUpdatePolicy.ValidationFailedException | API reference | Android Developers (original) (raw)
class ValidationFailedException : IllegalArgumentException, Parcelable
kotlin.Any | ||||
---|---|---|---|---|
↳ | kotlin.Throwable | |||
↳ | java.lang.Exception | |||
↳ | java.lang.RuntimeException | |||
↳ | java.lang.IllegalArgumentException | |||
↳ |
An exception class that represents various validation errors thrown from [SystemUpdatePolicy.setFreezePeriods](/reference/kotlin/android/app/admin/SystemUpdatePolicy#setFreezePeriods%28kotlin.collections.MutableList%29)
and [DevicePolicyManager.setSystemUpdatePolicy](/reference/kotlin/android/app/admin/DevicePolicyManager#setSystemUpdatePolicy%28android.content.ComponentName,%20android.app.admin.SystemUpdatePolicy%29)
Summary
Constants | |
---|---|
static Int | ERROR_COMBINED_FREEZE_PERIOD_TOO_CLOSE 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 | ERROR_COMBINED_FREEZE_PERIOD_TOO_LONG 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 | ERROR_DUPLICATE_OR_OVERLAP The freeze periods contains duplicates, periods that overlap with each other or periods whose start and end joins. |
static Int | ERROR_NEW_FREEZE_PERIOD_TOO_CLOSE There exists some freeze period which starts within 60 days of the preceding period's end time. |
static Int | ERROR_NEW_FREEZE_PERIOD_TOO_LONG There exists at least one freeze period whose length exceeds 90 days. |
static Int | ERROR_UNKNOWN Validation failed with unknown error. |
Inherited constants |
---|
From class Parcelable Int CONTENTS_FILE_DESCRIPTOR Descriptor bit used with describeContents(): indicates that the Parcelable object's flattened representation includes a file descriptor. Int PARCELABLE_WRITE_RETURN_VALUE Flag for use with writeToParcel: the object being written is a return value, that is the result of a function such as "Parcelable someFunction()", "void someFunction(out Parcelable)", or "void someFunction(inout Parcelable)". Some implementations may want to release resources at this point. |
Public methods | |
---|---|
Int | describeContents() |
Int | getErrorCode() Returns the type of validation error associated with this exception. |
Unit | writeToParcel(dest: Parcel, flags: Int) |
Properties | |
---|---|
static Parcelable.Creator<SystemUpdatePolicy.ValidationFailedException!> | CREATOR |
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: 6
ERROR_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: 5
ERROR_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: 2
ERROR_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: 4
ERROR_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: 3
ERROR_UNKNOWN
static val ERROR_UNKNOWN: Int
Validation failed with unknown error.
Value: 1