From 903fc44edb235cfb2ca229dd2a3437256dbc7624 Mon Sep 17 00:00:00 2001 From: parneet-guraya Date: Wed, 6 Sep 2023 01:43:19 +0530 Subject: [PATCH] fix lint @OptIn lint error Signed-off-by: parneet-guraya --- .../main/java/com/nextcloud/client/media/NextcloudExoPlayer.kt | 3 ++- .../com/owncloud/android/ui/preview/PreviewMediaFragment.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/nextcloud/client/media/NextcloudExoPlayer.kt b/app/src/main/java/com/nextcloud/client/media/NextcloudExoPlayer.kt index d2c3899eb9..9a9678b917 100644 --- a/app/src/main/java/com/nextcloud/client/media/NextcloudExoPlayer.kt +++ b/app/src/main/java/com/nextcloud/client/media/NextcloudExoPlayer.kt @@ -22,6 +22,7 @@ package com.nextcloud.client.media import android.content.Context +import androidx.annotation.OptIn import androidx.media3.common.util.UnstableApi import androidx.media3.datasource.DefaultDataSource import androidx.media3.datasource.okhttp.OkHttpDataSource @@ -38,7 +39,7 @@ object NextcloudExoPlayer { * IP versions and certificates. * */ - @UnstableApi + @OptIn(UnstableApi::class) @JvmStatic fun createNextcloudExoplayer(context: Context, nextcloudClient: NextcloudClient): ExoPlayer { val okHttpDataSourceFactory = OkHttpDataSource.Factory(nextcloudClient.client) diff --git a/app/src/main/java/com/owncloud/android/ui/preview/PreviewMediaFragment.java b/app/src/main/java/com/owncloud/android/ui/preview/PreviewMediaFragment.java index 168270a5f7..b00ecf9d51 100644 --- a/app/src/main/java/com/owncloud/android/ui/preview/PreviewMediaFragment.java +++ b/app/src/main/java/com/owncloud/android/ui/preview/PreviewMediaFragment.java @@ -82,6 +82,7 @@ import java.util.concurrent.Executors; import javax.inject.Inject; import androidx.annotation.NonNull; +import androidx.annotation.OptIn; import androidx.annotation.StringRes; import androidx.appcompat.app.ActionBar; import androidx.appcompat.app.AppCompatActivity; @@ -96,7 +97,7 @@ import androidx.media3.common.MediaItem; import androidx.media3.common.util.UnstableApi; import androidx.media3.exoplayer.ExoPlayer; -@UnstableApi +@OptIn(markerClass = UnstableApi.class) /** * This fragment shows a preview of a downloaded media file (audio or video). *