Added in API level 28

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

Added in API level 28
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

Added in API level 28
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

Added in API level 28
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

Added in API level 28
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

Added in API level 28
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

Added in API level 28
static val ERROR_UNKNOWN: Int

Validation failed with unknown error.

Value: 1

Public methods

describeContents

Added in API level 28
fun describeContents(): Int
Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

writeToParcel

Added in API level 28
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 either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties