Udostępnij za pośrednictwem


DevicePolicyManager.IsSafeOperation(Int32) Method

Definition

Checks if it's safe to run operations that can be affected by the given reason.

[Android.Runtime.Register("isSafeOperation", "(I)Z", "GetIsSafeOperation_IHandler", ApiSince=31)]
public virtual bool IsSafeOperation (int reason);
[<Android.Runtime.Register("isSafeOperation", "(I)Z", "GetIsSafeOperation_IHandler", ApiSince=31)>]
abstract member IsSafeOperation : int -> bool
override this.IsSafeOperation : int -> bool

Parameters

reason
Int32

currently, only supported reason is #OPERATION_SAFETY_REASON_DRIVING_DISTRACTION.

Returns

whether it's safe to run operations that can be affected by the given reason.

Attributes

Remarks

Checks if it's safe to run operations that can be affected by the given reason.

<b>Note:</b> notice that the operation safety state might change between the time this method returns and the operation's method is called, so calls to the latter could still throw a UnsafeStateException even when this method returns true.

Java documentation for android.app.admin.DevicePolicyManager.isSafeOperation(int).

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.

Applies to