Share via


PowerManager.WakeLock.Release Method

Definition

Overloads

Release()

Releases the wake lock.

Release(WakeLockFlags)

Releases the wake lock with flags to modify the release behavior.

Release()

Releases the wake lock.

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

Remarks

Releases the wake lock.

This method releases your claim to the CPU or screen being on. The screen may turn off shortly after you release the wake lock, or it may not if there are other wake locks still held.

Java documentation for android.os.PowerManager.WakeLock.release().

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

Release(WakeLockFlags)

Releases the wake lock with flags to modify the release behavior.

[Android.Runtime.Register("release", "(I)V", "GetRelease_IHandler")]
public virtual void Release (Android.OS.WakeLockFlags flags);
[<Android.Runtime.Register("release", "(I)V", "GetRelease_IHandler")>]
abstract member Release : Android.OS.WakeLockFlags -> unit
override this.Release : Android.OS.WakeLockFlags -> unit

Parameters

flags
WakeLockFlags

Combination of flag values to modify the release behavior. Currently only #RELEASE_FLAG_WAIT_FOR_NO_PROXIMITY is supported. Passing 0 is equivalent to calling #release().

Attributes

Remarks

Releases the wake lock with flags to modify the release behavior.

This method releases your claim to the CPU or screen being on. The screen may turn off shortly after you release the wake lock, or it may not if there are other wake locks still held.

Java documentation for android.os.PowerManager.WakeLock.release(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