Udostępnij za pośrednictwem


Activity.StopLockTask Method

Definition

Stop the current task from being locked.

[Android.Runtime.Register("stopLockTask", "()V", "GetStopLockTaskHandler")]
public virtual void StopLockTask ();
[<Android.Runtime.Register("stopLockTask", "()V", "GetStopLockTaskHandler")>]
abstract member StopLockTask : unit -> unit
override this.StopLockTask : unit -> unit
Attributes

Remarks

Stop the current task from being locked.

Called to end the LockTask or screen pinning mode started by #startLockTask(). This can only be called by activities that have called #startLockTask() previously.

<strong>Note:</strong> If the device is in LockTask mode that is not initially started by this activity, then calling this method will not terminate the LockTask mode, but only finish its own task. The device will remain in LockTask mode, until the activity which started the LockTask mode calls this method, or until its allowlist authorization is revoked by DevicePolicyManager#setLockTaskPackages(ComponentName, String[]).

Java documentation for android.app.Activity.stopLockTask().

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

See also