Fix lint errors in shortform demo app

PiperOrigin-RevId: 629080780
This commit is contained in:
tonihei 2024-04-29 08:47:31 -07:00 committed by Copybara-Service
parent a49b625cc5
commit 74bb4ac98d
3 changed files with 7 additions and 6 deletions

View File

@ -32,6 +32,6 @@ class MediaItemDatabase {
fun get(index: Int): MediaItem {
val uri = mediaUris.get(index.mod(mediaUris.size))
return return MediaItem.Builder().setUri(uri).setMediaId(index.toString()).build()
return MediaItem.Builder().setUri(uri).setMediaId(index.toString()).build()
}
}

View File

@ -33,6 +33,7 @@ import java.util.Collections
import java.util.LinkedList
import java.util.Queue
@OptIn(UnstableApi::class)
class PlayerPool(
private val numberOfPlayers: Int,
context: Context,
@ -92,10 +93,10 @@ class PlayerPool(
*
* @param keepOngoingPlayer The optional player that should keep playing if not paused.
*/
fun pauseAllPlayers(keepOngoingPlayer: Player? = null) {
playerMap.values.forEach {
if (it != keepOngoingPlayer) {
it.pause()
private fun pauseAllPlayers(keepOngoingPlayer: Player? = null) {
for (player in playerMap.values) {
if (player != keepOngoingPlayer) {
player.pause()
}
}
}

View File

@ -49,7 +49,7 @@ class ViewPagerMediaHolder(itemView: View, private val playerPool: PlayerPool) :
}
}
val player: ExoPlayer?
private val player: ExoPlayer?
get() {
return exoPlayer
}