Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c13087d5 authored by Alejandro Nijamkin's avatar Alejandro Nijamkin
Browse files

Adds some missing doc

Bug: 354269846
Test: N/A this is only docs
Flag: NONE this is only docs
Change-Id: Ie74543bdc67e7e7b2a8b45b0e85af61bb7fbb9c7
parent 4241d874
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -30,6 +30,12 @@ import kotlinx.coroutines.launch
/** Base class for all System UI view-models. */
abstract class SysUiViewModel : BaseActivatable() {

    /**
     * Returns a snapshot [State] that's kept up-to-date as long as the [SysUiViewModel] is active.
     *
     * @param source The upstream [StateFlow] to collect from; values emitted to it will be
     *   automatically set on the returned [State].
     */
    @StateFactoryMarker
    fun <T> hydratedStateOf(
        source: StateFlow<T>,
@@ -40,6 +46,13 @@ abstract class SysUiViewModel : BaseActivatable() {
        )
    }

    /**
     * Returns a snapshot [State] that's kept up-to-date as long as the [SysUiViewModel] is active.
     *
     * @param initialValue The first value to place on the [State]
     * @param source The upstream [Flow] to collect from; values emitted to it will be automatically
     *   set on the returned [State].
     */
    @StateFactoryMarker
    fun <T> hydratedStateOf(
        initialValue: T,