Upgrade ktlint and add twitter compose rules.

This commit is contained in:
Alex Hart
2023-02-06 11:04:40 -04:00
committed by Greyson Parrelli
parent 52e9b31554
commit 605289aca4
174 changed files with 574 additions and 373 deletions

View File

@@ -82,7 +82,7 @@ class SimpleExoPlayerPool(context: Context) : ExoPlayerPool<ExoPlayer>(MAXIMUM_R
* players will be returned first when a player is requested via require.
*/
abstract class ExoPlayerPool<T : ExoPlayer>(
private val maximumReservedPlayers: Int,
private val maximumReservedPlayers: Int
) : AppForegroundObserver.Listener {
companion object {
@@ -130,7 +130,7 @@ abstract class ExoPlayerPool<T : ExoPlayer>(
@MainThread
private fun get(allowReserved: Boolean, tag: String): T? {
val player = findAvailablePlayer(allowReserved)
return if (player == null && pool.size < getMaximumAllowed(allowReserved)) {
val toReturn = if (player == null && pool.size < getMaximumAllowed(allowReserved)) {
val newPlayer = createPlayer()
val poolState = createPoolStateForNewEntry(allowReserved, tag)
pool[newPlayer] = poolState
@@ -142,7 +142,9 @@ abstract class ExoPlayerPool<T : ExoPlayer>(
} else {
Log.d(TAG, "Failed to get an ExoPlayer instance for tag: $tag :: ${poolStats()}")
null
}?.apply {
}
return toReturn?.apply {
configureForVideoPlayback()
}
}