UnsafeStateException
class UnsafeStateException : IllegalStateException, Parcelable
| kotlin.Any | |||||
| ↳ | kotlin.Throwable | ||||
| ↳ | java.lang.Exception | ||||
| ↳ | java.lang.RuntimeException | ||||
| ↳ | java.lang.IllegalStateException | ||||
| ↳ | android.app.admin.UnsafeStateException | ||||
Exception thrown when a android.app.admin.DevicePolicyManager operation failed because it was not safe to be executed at that moment.
For example, it can be thrown on automotive devices when the vehicle is moving.
Summary
| Inherited constants | |
|---|---|
| Public methods | |
|---|---|
| Int |
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| MutableList<Int!> |
Gets the reasons the operation is unsafe. |
| Unit |
writeToParcel(dest: Parcel, flags: Int)Flatten this object in to a Parcel. |
| Properties | |
|---|---|
| static Parcelable.Creator<UnsafeStateException!> | |
| String? | |
Public 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
|
getReasons
fun getReasons(): MutableList<Int!>
Gets the reasons the operation is unsafe.
| Return | |
|---|---|
MutableList<Int!> |
currently, only valid reason is android.app.admin.DevicePolicyManager#OPERATION_SAFETY_REASON_DRIVING_DISTRACTION. This value cannot be null. |
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Flatten this object in to a Parcel.
| Parameters | |
|---|---|
dest |
Parcel: 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
message
val message: String?
| Return | |
|---|---|
String? |
the detail message string of this Throwable instance (which may be null). |