Fix lint errors in shortform demo app
PiperOrigin-RevId: 629080780
This commit is contained in:
parent
a49b625cc5
commit
74bb4ac98d
@ -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()
|
||||
}
|
||||
}
|
||||
|
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ class ViewPagerMediaHolder(itemView: View, private val playerPool: PlayerPool) :
|
||||
}
|
||||
}
|
||||
|
||||
val player: ExoPlayer?
|
||||
private val player: ExoPlayer?
|
||||
get() {
|
||||
return exoPlayer
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user