Language

LightsManager.LightsSession.Close Method

Definition

Closes this resource, relinquishing any underlying resources.

[Android.Runtime.Register("close", "()V", "GetCloseHandler", ApiSince=31)]
public abstract void Close();
[<Android.Runtime.Register("close", "()V", "GetCloseHandler", ApiSince=31)>]
abstract member Close : unit -> unit

Implements

Attributes

Remarks

Closes this resource, relinquishing any underlying resources. This method is invoked automatically on objects managed by the try-with-resources statement.

The try-with-resources statement is a Java language feature. In .NET, call Close() explicitly when the session is no longer needed, for example in a finally block. Closing ends this session's requests. The manager can then honor another session's requests; closing does not guarantee restoration of an earlier color.

See the Android 17 session contract and system session implementation.

Android reference for android.hardware.lights.LightsManager.LightsSession.close.

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