OperationSafetyReason Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Identifies why an operation is unsafe, as reported by UnsafeStateException.
public enum OperationSafetyReason
type OperationSafetyReason =
- Inheritance
-
OperationSafetyReason
Fields
| Name | Value | Description |
|---|---|---|
| None | 0 | This managed value is 0 and has no matching public Android constant. |
| DrivingDistraction | 1 | Indicates that a UnsafeStateException was thrown because the operation would distract the driver of the vehicle. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. |
Remarks
DrivingDistraction is the only reason that Android makes public. IsSafeOperation(Int32) and OnOperationSafetyStateChanged(Context, Int32, Boolean) use the Int32 type for the reason. Cast DrivingDistraction when you pass it to IsSafeOperation(Int32).