diff --git a/datalayer/watch/api/current.api b/datalayer/watch/api/current.api index 22e75b8ccc..4f8c85ec7c 100644 --- a/datalayer/watch/api/current.api +++ b/datalayer/watch/api/current.api @@ -3,6 +3,7 @@ package com.google.android.horologist.datalayer.watch { @com.google.android.horologist.annotations.ExperimentalHorologistApi public final class WearDataLayerAppHelper extends com.google.android.horologist.data.apphelper.DataLayerAppHelper { ctor public WearDataLayerAppHelper(android.content.Context context, com.google.android.horologist.data.WearDataLayerRegistry registry, kotlinx.coroutines.CoroutineScope scope, optional String? appStoreUri); + method public kotlinx.coroutines.flow.Flow getSurfacesInfo(); method public suspend Object? installOnNode(String node, kotlin.coroutines.Continuation); method public suspend Object? markActivityLaunchedOnce(kotlin.coroutines.Continuation); method public suspend Object? markComplicationAsActivated(String complicationName, int complicationInstanceId, androidx.wear.watchface.complications.data.ComplicationType complicationType, kotlin.coroutines.Continuation); @@ -12,6 +13,7 @@ package com.google.android.horologist.datalayer.watch { method public suspend Object? markTileAsInstalled(String tileName, kotlin.coroutines.Continuation); method public suspend Object? markTileAsRemoved(String tileName, kotlin.coroutines.Continuation); method @CheckResult public suspend Object? startCompanion(String node, kotlin.coroutines.Continuation); + property public final kotlinx.coroutines.flow.Flow surfacesInfo; } public final class WearDataLayerAppHelperKt { diff --git a/datalayer/watch/src/main/java/com/google/android/horologist/datalayer/watch/WearDataLayerAppHelper.kt b/datalayer/watch/src/main/java/com/google/android/horologist/datalayer/watch/WearDataLayerAppHelper.kt index 0413da751b..75d312a9ff 100644 --- a/datalayer/watch/src/main/java/com/google/android/horologist/datalayer/watch/WearDataLayerAppHelper.kt +++ b/datalayer/watch/src/main/java/com/google/android/horologist/datalayer/watch/WearDataLayerAppHelper.kt @@ -25,6 +25,7 @@ import androidx.wear.watchface.complications.data.ComplicationType import com.google.android.horologist.annotations.ExperimentalHorologistApi import com.google.android.horologist.data.AppHelperResultCode import com.google.android.horologist.data.ComplicationInfo +import com.google.android.horologist.data.SurfacesInfo import com.google.android.horologist.data.TileInfo import com.google.android.horologist.data.UsageStatus import com.google.android.horologist.data.WearDataLayerRegistry @@ -39,6 +40,7 @@ import com.google.android.horologist.data.tileInfo import com.google.android.horologist.data.usageInfo import com.google.protobuf.Timestamp import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.guava.await import kotlinx.coroutines.tasks.await @@ -64,6 +66,11 @@ public class WearDataLayerAppHelper( ) } + /** + * Return the [SurfacesInfo] of this node. + */ + public val surfacesInfo: Flow = surfacesInfoDataStore.data + override suspend fun installOnNode(node: String) { checkIsForegroundOrThrow() if (appStoreUri != null &&