LightsManager.LightsSession.Close Method
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.
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.