Skip to content

Commit

Permalink
Bump the androidx group with 6 updates (#504)
Browse files Browse the repository at this point in the history
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gaëtan Muller <[email protected]>
  • Loading branch information
dependabot[bot] and MGaetan89 authored Apr 18, 2024
1 parent a034b6e commit 12ee176
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ internal object AppConfig {
internal const val minSdk = 21
internal const val targetSdk = 34
internal const val compileSdk = 34
internal const val androidXComposeCompiler = "1.5.11"
internal const val androidXComposeCompiler = "1.5.12"

// When changing this value, don't forget to also update the Detekt config in the root `build.gradle.kts` file
internal val javaVersion = JavaVersion.VERSION_17
Expand Down
7 changes: 3 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[versions]
accompanist = "0.34.0"
android-gradle-plugin = "8.3.2"
androidx-activity = "1.8.2"
androidx-activity = "1.9.0"
androidx-annotation = "1.7.1"
androidx-compose = "2024.04.00"
androidx-core = "1.12.0"
androidx-compose = "2024.04.01"
androidx-core = "1.13.0"
androidx-fragment = "1.6.2"
androidx-leanback = "1.0.0"
androidx-lifecycle = "2.7.0"
Expand Down Expand Up @@ -42,7 +42,6 @@ accompanist-navigation-material = { module = "com.google.accompanist:accompanist
android-gradle-api = { module = "com.android.tools.build:gradle-api", version.ref = "android-gradle-plugin" }
androidx-activity = { module = "androidx.activity:activity", version.ref = "androidx-activity" }
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activity" }
androidx-activity-ktx = { module = "androidx.activity:activity-ktx", version.ref = "androidx-activity" }
androidx-annotation = { module = "androidx.annotation:annotation", version.ref = "androidx-annotation" }
androidx-core = { module = "androidx.core:core", version.ref = "androidx-core" }
androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "androidx-core" }
Expand Down
1 change: 1 addition & 0 deletions pillarbox-demo-tv/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ dependencies {
implementation(libs.androidx.compose.ui.tooling.preview)
implementation(libs.androidx.compose.ui.unit)
implementation(libs.androidx.compose.ui.util)
implementation(libs.androidx.core)
implementation(libs.androidx.fragment)
implementation(libs.androidx.lifecycle.common)
implementation(libs.androidx.lifecycle.runtime.ktx)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ package ch.srgssr.pillarbox.demo.tv.ui.player

import android.content.Context
import android.content.Intent
import android.os.Build
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.ui.Modifier
import androidx.core.content.IntentCompat
import ch.srgssr.pillarbox.demo.shared.data.DemoItem
import ch.srgssr.pillarbox.demo.shared.di.PlayerModule
import ch.srgssr.pillarbox.demo.tv.ui.player.compose.PlayerView
Expand All @@ -33,11 +33,7 @@ class PlayerActivity : ComponentActivity() {
player = PlayerModule.provideDefaultPlayer(this)
mediaSession = PillarboxMediaSession.Builder(this, player)
.build()
val demoItem = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
intent.getSerializableExtra(ARG_ITEM, DemoItem::class.java)
} else {
intent.getSerializableExtra(ARG_ITEM) as DemoItem?
}
val demoItem = IntentCompat.getSerializableExtra(intent, ARG_ITEM, DemoItem::class.java)
demoItem?.let {
player.setMediaItem(it.toMediaItem())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package ch.srgssr.pillarbox.demo.tv.ui.player.leanback

import android.app.Activity
import android.content.Intent
import android.os.Build
import android.os.Bundle
import androidx.core.content.IntentCompat
import androidx.fragment.app.FragmentActivity
import ch.srgssr.pillarbox.demo.shared.data.DemoItem
import ch.srgssr.pillarbox.demo.tv.R
Expand All @@ -26,11 +26,7 @@ class LeanbackPlayerActivity : FragmentActivity() {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_leanback_player)
leanbackPlayerFragment = supportFragmentManager.findFragmentById(R.id.fragment_container) as LeanbackPlayerFragment
val demoItem = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
intent.getSerializableExtra(ARG_ITEM, DemoItem::class.java)
} else {
intent.getSerializableExtra(ARG_ITEM) as DemoItem?
}
val demoItem = IntentCompat.getSerializableExtra(intent, ARG_ITEM, DemoItem::class.java)
demoItem?.let {
leanbackPlayerFragment.setDemoItem(it)
}
Expand Down
1 change: 0 additions & 1 deletion pillarbox-demo/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ dependencies {
implementation(libs.accompanist.navigation.material)
implementation(libs.androidx.activity)
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.activity.ktx)
implementation(libs.androidx.annotation)
implementation(libs.androidx.compose.animation)
implementation(libs.androidx.compose.animation.core)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier
import androidx.core.content.IntentCompat
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.flowWithLifecycle
Expand Down Expand Up @@ -56,20 +57,15 @@ class SimplePlayerActivity : ComponentActivity(), ServiceConnection {
private var layoutStyle: Int = LAYOUT_PLAYLIST

private fun readIntent(intent: Intent) {
intent.extras?.let {
layoutStyle = it.getInt(ARG_LAYOUT)
val playlist: Playlist = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
it.getSerializable(ARG_PLAYLIST, Playlist::class.java)!!
} else {
it.getSerializable(ARG_PLAYLIST) as Playlist
}
playerViewModel.playUri(playlist.items)
}
layoutStyle = intent.getIntExtra(ARG_LAYOUT, LAYOUT_PLAYLIST)

val playlist = IntentCompat.getSerializableExtra(intent, ARG_PLAYLIST, Playlist::class.java)
playlist?.let { playerViewModel.playUri(it.items) }
}

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val ilHost = (intent.extras?.getSerializable(ARG_IL_HOST) as URL?) ?: IlHost.DEFAULT
val ilHost = IntentCompat.getSerializableExtra(intent, ARG_IL_HOST, URL::class.java) ?: IlHost.DEFAULT
playerViewModel = ViewModelProvider(this, factory = SimplePlayerViewModel.Factory(application, ilHost))[SimplePlayerViewModel::class.java]
readIntent(intent)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
Expand Down Expand Up @@ -110,11 +106,9 @@ class SimplePlayerActivity : ComponentActivity(), ServiceConnection {
)
}

override fun onNewIntent(intent: Intent?) {
override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent)
intent?.let {
readIntent(it)
}
readIntent(intent)
}

override fun onServiceConnected(name: ComponentName?, service: IBinder?) {
Expand Down

0 comments on commit 12ee176

Please sign in to comment.