Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import io.grpc.binder.BinderChannelBuilder
import io.grpc.binder.UntrustedSecurityPolicies

object AiGrpcClientLookup {
// PackageManager.GET_SIGNATURES is deprecated in API 28+ in favor of GET_SIGNING_CERTIFICATES
@Suppress("DEPRECATION")
@android.annotation.SuppressLint("PackageManagerGetSignatures")
fun lookupInferenceService(
context: Context,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ abstract class BindableAiGrpcService : LifecycleService() {
private lateinit var server: Server
private val binderReceiver = IBinderReceiver()

// PackageManager.GET_SIGNATURES is deprecated in API 28+ in favor of GET_SIGNING_CERTIFICATES
@Suppress("DEPRECATION")
@get:android.annotation.SuppressLint("PackageManagerGetSignatures")
open val securityPolicy: SecurityPolicy by lazy {
val mySignature = packageManager.getPackageInfo(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ class GeminiSDKInferenceServiceImpl(
}
}

// generateImages is deprecated in the underlying Gemini Java SDK
@Suppress("DEPRECATION")
private fun geminiGenerateImages(request: PromptRequest, modelId: String): Flow<Response> =
flow {
val responses = client.models.generateImages(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
* limitations under the License.
*/

// Uses legacy Wear Material 2 auth composable dialogs (SignedInConfirmationDialog, SelectAccountScreen)
@file:Suppress("DEPRECATION")

package com.google.android.horologist.auth.ui.common.screens.streamline

import androidx.compose.runtime.Composable
Expand Down
2 changes: 0 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,6 @@ subprojects {
// Allow use of @OptIn
"-opt-in=kotlin.RequiresOptIn",
"-opt-in=com.google.android.horologist.annotations.ExperimentalHorologistApi",
// Enable default methods in interfaces
"-Xjvm-default=all"
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ public class SectionedListScope {

internal val sections: MutableList<Section<*>> = mutableListOf()

@SectionScopeMarker
public fun <T> section(
state: Section.State<T>,
content: SectionScope<T>.() -> Unit,
Expand All @@ -232,7 +231,6 @@ public class SectionedListScope {
/**
* Add a section in [loaded][Section.State.Loaded] state.
*/
@SectionScopeMarker
public fun <T> section(
list: List<T>,
content: SectionScope<T>.() -> Unit,
Expand All @@ -244,7 +242,6 @@ public class SectionedListScope {
/**
* Add a section in [loaded][Section.State.Loaded] state with a single item.
*/
@SectionScopeMarker
public fun section(
content: SectionScope<Unit>.() -> Unit,
): Unit = section(
Expand Down Expand Up @@ -287,7 +284,6 @@ public class SectionScope<T> {
internal var footerVisibleStates: Section.VisibleStates = LOADED_STATE_ONLY
private set

@SectionScopeMarker
public fun header(
visibleStates: Section.VisibleStates = ALL_STATES,
content: @Composable SectionContentScope.() -> Unit,
Expand All @@ -296,7 +292,6 @@ public class SectionScope<T> {
headerContent = content
}

@SectionScopeMarker
public fun loading(
count: Int = DEFAULT_LOADING_CONTENT_COUNT,
content: @Composable SectionContentScope.() -> Unit,
Expand All @@ -306,22 +301,18 @@ public class SectionScope<T> {
loadingContent = content
}

@SectionScopeMarker
public fun loaded(content: @Composable SectionContentScope.(T) -> Unit) {
loadedContent = content
}

@SectionScopeMarker
public fun failed(content: @Composable SectionContentScope.() -> Unit) {
failedContent = content
}

@SectionScopeMarker
public fun empty(content: @Composable SectionContentScope.() -> Unit) {
emptyContent = content
}

@SectionScopeMarker
public fun footer(
visibleStates: Section.VisibleStates = LOADED_STATE_ONLY,
content: @Composable SectionContentScope.() -> Unit,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import androidx.compose.ui.res.painterResource
/** A drawable resource ID that can be represented as a [Painter]. */
@JvmInline
public value class DrawableResPaintable(
@DrawableRes private val id: Int,
@param:DrawableRes private val id: Int,
) : PaintableIcon {

@Composable
Expand Down
65 changes: 0 additions & 65 deletions media/data/api/current.api
Original file line number Diff line number Diff line change
Expand Up @@ -217,17 +217,6 @@ package com.google.android.horologist.media.database {
method public abstract com.google.android.horologist.media.database.dao.PlaylistMediaDao playlistMediaDao();
}

@javax.annotation.processing.Generated({"androidx.room.RoomProcessor"}) public final class MediaDatabase_Impl extends com.google.android.horologist.media.database.MediaDatabase {
ctor public MediaDatabase_Impl();
method public void clearAllTables();
method protected androidx.room.InvalidationTracker createInvalidationTracker();
method protected androidx.room.RoomOpenDelegate createOpenDelegate();
method public com.google.android.horologist.media.database.dao.MediaDao mediaDao();
method public com.google.android.horologist.media.database.dao.MediaDownloadDao mediaDownloadDao();
method public com.google.android.horologist.media.database.dao.PlaylistDao playlistDao();
method public com.google.android.horologist.media.database.dao.PlaylistMediaDao playlistMediaDao();
}

}

package com.google.android.horologist.media.database.dao {
Expand All @@ -237,17 +226,6 @@ package com.google.android.horologist.media.database.dao {
method @androidx.room.Insert(onConflict=androidx.room.OnConflictStrategy.Companion.REPLACE) public suspend Object? upsert(java.util.List<com.google.android.horologist.media.database.model.MediaEntity> mediaList, kotlin.coroutines.Continuation<? super kotlin.Unit>);
}

@javax.annotation.processing.Generated({"androidx.room.RoomProcessor"}) public final class MediaDao_Impl implements com.google.android.horologist.media.database.dao.MediaDao {
ctor public MediaDao_Impl(androidx.room.RoomDatabase __db);
method public suspend Object? delete(java.util.List<java.lang.String> mediaIds, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public suspend Object? upsert(java.util.List<com.google.android.horologist.media.database.model.MediaEntity> mediaList, kotlin.coroutines.Continuation<? super kotlin.Unit>);
field public static final com.google.android.horologist.media.database.dao.MediaDao_Impl.Companion Companion;
}

public static final class MediaDao_Impl.Companion {
method public java.util.List<kotlin.reflect.KClass<? extends java.lang.Object?>> getRequiredConverters();
}

@androidx.room.Dao @com.google.android.horologist.annotations.ExperimentalHorologistApi public interface MediaDownloadDao {
method @androidx.room.Query("\n DELETE FROM MediaDownloadEntity\n WHERE mediaId = :mediaId\n ") public suspend Object? delete(String mediaId, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method @androidx.room.Query("\n DELETE FROM MediaDownloadEntity\n WHERE mediaId in (:mediaIds)\n ") public suspend Object? delete(java.util.List<java.lang.String> mediaIds, kotlin.coroutines.Continuation<? super kotlin.Unit>);
Expand Down Expand Up @@ -286,23 +264,6 @@ package com.google.android.horologist.media.database.dao {
property public com.google.android.horologist.media.database.model.MediaDownloadEntityStatus status;
}

@javax.annotation.processing.Generated({"androidx.room.RoomProcessor"}) public final class MediaDownloadDao_Impl implements com.google.android.horologist.media.database.dao.MediaDownloadDao {
ctor public MediaDownloadDao_Impl(androidx.room.RoomDatabase __db);
method public suspend Object? delete(String mediaId, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public suspend Object? delete(java.util.List<java.lang.String> mediaIds, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public suspend Object? getAllByStatus(com.google.android.horologist.media.database.model.MediaDownloadEntityStatus status, kotlin.coroutines.Continuation<? super java.util.List<com.google.android.horologist.media.database.model.MediaDownloadEntity>>);
method public kotlinx.coroutines.flow.Flow<java.util.List<com.google.android.horologist.media.database.model.MediaDownloadEntity>> getList(java.util.List<java.lang.String> mediaIds);
method public suspend Object? insert(com.google.android.horologist.media.database.model.MediaDownloadEntity mediaDownloadEntity, kotlin.coroutines.Continuation<? super java.lang.Long>);
method public suspend Object? updateProgress(String mediaId, float progress, long size, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public suspend Object? updateStatus(String mediaId, com.google.android.horologist.media.database.model.MediaDownloadEntityStatus status, kotlin.coroutines.Continuation<? super kotlin.Unit>);
method public suspend Object? updateStatusAndProgress(com.google.android.horologist.media.database.dao.MediaDownloadDao.StatusAndProgress statusAndProgress, kotlin.coroutines.Continuation<? super kotlin.Unit>);
field public static final com.google.android.horologist.media.database.dao.MediaDownloadDao_Impl.Companion Companion;
}

public static final class MediaDownloadDao_Impl.Companion {
method public java.util.List<kotlin.reflect.KClass<? extends java.lang.Object?>> getRequiredConverters();
}

@androidx.room.Dao @com.google.android.horologist.annotations.ExperimentalHorologistApi public interface PlaylistDao {
method @androidx.room.Query("\n DELETE FROM PlaylistEntity\n WHERE playlistId in (:playlistIds)\n ") public void delete(java.util.List<java.lang.String> playlistIds);
method @androidx.room.Query("\n SELECT * FROM PlaylistEntity\n WHERE EXISTS (\n SELECT 1 FROM PlaylistMediaEntity\n WHERE PlaylistMediaEntity.playlistId = PlaylistEntity.playlistId\n AND EXISTS (\n SELECT 1 FROM MediaDownloadEntity\n WHERE MediaDownloadEntity.mediaId = PlaylistMediaEntity.mediaId\n )\n )\n ") @androidx.room.Transaction public kotlinx.coroutines.flow.Flow<java.util.List<com.google.android.horologist.media.database.model.PopulatedPlaylist>> getAllDownloaded();
Expand All @@ -312,37 +273,11 @@ package com.google.android.horologist.media.database.dao {
method @androidx.room.Insert(onConflict=androidx.room.OnConflictStrategy.Companion.REPLACE) public suspend Object? upsert(com.google.android.horologist.media.database.model.PlaylistEntity playlistEntity, java.util.List<com.google.android.horologist.media.database.model.MediaEntity> mediaEntityList, java.util.List<com.google.android.horologist.media.database.model.PlaylistMediaEntity> playlistMediaEntityList, kotlin.coroutines.Continuation<? super kotlin.Unit>);
}

@javax.annotation.processing.Generated({"androidx.room.RoomProcessor"}) public final class PlaylistDao_Impl implements com.google.android.horologist.media.database.dao.PlaylistDao {
ctor public PlaylistDao_Impl(androidx.room.RoomDatabase __db);
method public void delete(java.util.List<java.lang.String> playlistIds);
method public kotlinx.coroutines.flow.Flow<java.util.List<com.google.android.horologist.media.database.model.PopulatedPlaylist>> getAllDownloaded();
method public kotlinx.coroutines.flow.Flow<java.util.List<com.google.android.horologist.media.database.model.PopulatedPlaylist>> getAllPopulated();
method public suspend Object? getPopulated(String playlistId, kotlin.coroutines.Continuation<? super com.google.android.horologist.media.database.model.PopulatedPlaylist?>);
method public kotlinx.coroutines.flow.Flow<com.google.android.horologist.media.database.model.PopulatedPlaylist?> getPopulatedStream(String playlistId);
method public suspend Object? upsert(com.google.android.horologist.media.database.model.PlaylistEntity playlistEntity, java.util.List<com.google.android.horologist.media.database.model.MediaEntity> mediaEntityList, java.util.List<com.google.android.horologist.media.database.model.PlaylistMediaEntity> playlistMediaEntityList, kotlin.coroutines.Continuation<? super kotlin.Unit>);
field public static final com.google.android.horologist.media.database.dao.PlaylistDao_Impl.Companion Companion;
}

public static final class PlaylistDao_Impl.Companion {
method public java.util.List<kotlin.reflect.KClass<? extends java.lang.Object?>> getRequiredConverters();
}

@androidx.room.Dao @com.google.android.horologist.annotations.ExperimentalHorologistApi public interface PlaylistMediaDao {
method @androidx.room.Query("\n DELETE FROM PlaylistMediaEntity\n WHERE mediaId in (:mediaIds)\n ") public void deleteByMediaId(java.util.List<java.lang.String> mediaIds);
method @androidx.room.Query("\n DELETE FROM PlaylistMediaEntity\n WHERE playlistId in (:playlistIds)\n ") public void deleteByPlaylistId(java.util.List<java.lang.String> playlistIds);
}

@javax.annotation.processing.Generated({"androidx.room.RoomProcessor"}) public final class PlaylistMediaDao_Impl implements com.google.android.horologist.media.database.dao.PlaylistMediaDao {
ctor public PlaylistMediaDao_Impl(androidx.room.RoomDatabase __db);
method public void deleteByMediaId(java.util.List<java.lang.String> mediaIds);
method public void deleteByPlaylistId(java.util.List<java.lang.String> playlistIds);
field public static final com.google.android.horologist.media.database.dao.PlaylistMediaDao_Impl.Companion Companion;
}

public static final class PlaylistMediaDao_Impl.Companion {
method public java.util.List<kotlin.reflect.KClass<? extends java.lang.Object?>> getRequiredConverters();
}

}

package com.google.android.horologist.media.database.mapper {
Expand Down
4 changes: 2 additions & 2 deletions media/ui-material3/api/current.api
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,11 @@ package com.google.android.horologist.media.ui.material3.components.controls {
}

public final class PauseButtonKt {
method @KotlinOnly @androidx.compose.runtime.Composable public static void PauseButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.wear.compose.material3.ColorScheme colorScheme, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional String contentDescription, optional androidx.compose.ui.unit.Dp iconSize, optional androidx.wear.compose.material3.IconButtonColors colors);
method @KotlinOnly @androidx.compose.runtime.Composable public static void PauseButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional androidx.wear.compose.material3.ColorScheme colorScheme, optional boolean enabled, optional String contentDescription, optional androidx.compose.ui.unit.Dp iconSize, optional androidx.wear.compose.material3.IconButtonColors colors);
}

public final class PlayButtonKt {
method @KotlinOnly @androidx.compose.runtime.Composable public static void PlayButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.wear.compose.material3.ColorScheme colorScheme, optional androidx.compose.ui.Modifier modifier, optional boolean enabled, optional String contentDescription, optional androidx.compose.ui.unit.Dp iconSize, optional androidx.wear.compose.material3.IconButtonColors colors);
method @KotlinOnly @androidx.compose.runtime.Composable public static void PlayButton(kotlin.jvm.functions.Function0<kotlin.Unit> onClick, optional androidx.compose.ui.Modifier modifier, optional androidx.wear.compose.material3.ColorScheme colorScheme, optional boolean enabled, optional String contentDescription, optional androidx.compose.ui.unit.Dp iconSize, optional androidx.wear.compose.material3.IconButtonColors colors);
}

public final class SeekBackButtonKt {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ internal fun RotatingWavyProgressIndicator(
shapeMorphProgress: State<Float>,
rotationProgress: State<Float>,
strokeWidth: Dp,
colorScheme: ColorScheme = MaterialTheme.colorScheme,
modifier: Modifier = Modifier,
colorScheme: ColorScheme = MaterialTheme.colorScheme,
) {
val coercedProgress by remember {
derivedStateOf { progress.value.coerceIn(0f, 1f) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ import com.google.android.horologist.media.ui.model.R
@Composable
public fun PauseButton(
onClick: () -> Unit,
colorScheme: ColorScheme = MaterialTheme.colorScheme,
modifier: Modifier = Modifier,
colorScheme: ColorScheme = MaterialTheme.colorScheme,
enabled: Boolean = true,
contentDescription: String = stringResource(id = R.string.horologist_pause_button_content_description),
iconSize: Dp = IconButtonDefaults.LargeIconSize,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ import com.google.android.horologist.media.ui.model.R
@Composable
public fun PlayButton(
onClick: () -> Unit,
colorScheme: ColorScheme = MaterialTheme.colorScheme,
modifier: Modifier = Modifier,
colorScheme: ColorScheme = MaterialTheme.colorScheme,
enabled: Boolean = true,
contentDescription: String = stringResource(id = R.string.horologist_play_button_content_description),
iconSize: Dp = IconButtonDefaults.LargeIconSize,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.text.InlineTextContent
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableIntStateOf
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
Expand Down Expand Up @@ -176,7 +177,7 @@ private class MarqueeController(
var edgeGradientWidth: Dp by mutableStateOf(edgeGradientWidth)
var startGap: Dp by mutableStateOf(startGap)
private var needsScrolling by mutableStateOf(false)
private var contentWidth: Int by mutableStateOf(-1)
private var contentWidth: Int by mutableIntStateOf(-1)

val outsideMarqueeModifier: Modifier = Modifier
.layout { measurable, constraints ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ public class SectionedListScope {

internal val sections: MutableList<Section<*>> = mutableListOf()

@SectionScopeMarker
public fun <T> section(
state: Section.State<T>,
content: SectionScope<T>.() -> Unit,
Expand All @@ -229,7 +228,6 @@ public class SectionedListScope {
/**
* Add a section in [loaded][Section.State.Loaded] state.
*/
@SectionScopeMarker
public fun <T> section(
list: List<T>,
content: SectionScope<T>.() -> Unit,
Expand All @@ -241,7 +239,6 @@ public class SectionedListScope {
/**
* Add a section in [loaded][Section.State.Loaded] state with a single item.
*/
@SectionScopeMarker
public fun section(
content: SectionScope<Unit>.() -> Unit,
): Unit = section(
Expand Down Expand Up @@ -284,7 +281,6 @@ public class SectionScope<T> {
internal var footerVisibleStates: Section.VisibleStates = Section.LOADED_STATE_ONLY
private set

@SectionScopeMarker
public fun header(
visibleStates: Section.VisibleStates = Section.ALL_STATES,
content: @Composable SectionContentScope.() -> Unit,
Expand All @@ -293,7 +289,6 @@ public class SectionScope<T> {
headerContent = content
}

@SectionScopeMarker
public fun loading(
count: Int = Section.DEFAULT_LOADING_CONTENT_COUNT,
content: @Composable SectionContentScope.() -> Unit,
Expand All @@ -303,22 +298,18 @@ public class SectionScope<T> {
loadingContent = content
}

@SectionScopeMarker
public fun loaded(content: @Composable SectionContentScope.(T) -> Unit) {
loadedContent = content
}

@SectionScopeMarker
public fun failed(content: @Composable SectionContentScope.() -> Unit) {
failedContent = content
}

@SectionScopeMarker
public fun empty(content: @Composable SectionContentScope.() -> Unit) {
emptyContent = content
}

@SectionScopeMarker
public fun footer(
visibleStates: Section.VisibleStates = Section.LOADED_STATE_ONLY,
content: @Composable SectionContentScope.() -> Unit,
Expand Down
Loading
Loading