0
0
mirror of https://github.com/mediathekview/zapp.git synced 2024-09-20 04:12:14 +02:00

Handle lint warnings

This commit is contained in:
Christine Coenen 2021-11-07 19:43:35 +01:00
parent d8c1a6cee9
commit 23abff6142
3 changed files with 7 additions and 8 deletions

View File

@ -7,7 +7,6 @@ import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import android.os.Build
import androidx.core.app.NotificationCompat
import com.tonyodev.fetch2.*
import com.tonyodev.fetch2.util.DEFAULT_NOTIFICATION_TIMEOUT_AFTER

View File

@ -8,24 +8,22 @@ import android.graphics.Bitmap
import android.os.IBinder
import androidx.core.app.NotificationCompat
import androidx.core.content.ContextCompat
import com.google.android.exoplayer2.ui.DefaultMediaDescriptionAdapter
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.ServiceLifecycleDispatcher
import androidx.lifecycle.lifecycleScope
import com.google.android.exoplayer2.ui.DefaultMediaDescriptionAdapter
import com.google.android.exoplayer2.ui.PlayerNotificationManager
import com.google.android.exoplayer2.ui.PlayerNotificationManager.BitmapCallback
import com.google.android.exoplayer2.ui.PlayerNotificationManager.MediaDescriptionAdapter
import de.christinecoenen.code.zapp.R
import de.christinecoenen.code.zapp.utils.system.NotificationHelper
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.launch
import org.koin.android.ext.android.inject
import timber.log.Timber
import kotlin.coroutines.CoroutineContext
class BackgroundPlayerService : IntentService("BackgroundPlayerService"),
MediaDescriptionAdapter,
@ -232,7 +230,7 @@ class BackgroundPlayerService : IntentService("BackgroundPlayerService"),
return this.player.currentVideoInfo!!.title
}
override fun createCurrentContentIntent(player: com.google.android.exoplayer2.Player): PendingIntent? {
override fun createCurrentContentIntent(player: com.google.android.exoplayer2.Player): PendingIntent {
Timber.i("createCurrentContentIntent: %s", foregroundActivityIntent!!.component)
// a notification click will bring us back to the activity that launched it

View File

@ -12,7 +12,8 @@
<!-- Overwritten layout for StyledPlayerView.
Original can be found at: https://github.com/google/ExoPlayer/blob/release-v2/library/ui/src/main/res/layout/exo_styled_player_view.xml
-->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<merge xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android">
<com.google.android.exoplayer2.ui.AspectRatioFrameLayout
android:id="@id/exo_content_frame"
@ -32,7 +33,8 @@
android:id="@id/exo_artwork"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitXY" />
android:scaleType="fitXY"
tools:ignore="ContentDescription" />
<com.google.android.exoplayer2.ui.SubtitleView
android:id="@id/exo_subtitles"
@ -77,5 +79,5 @@
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:indeterminate="true" />
</merge>