media/demos/session/src/main
ibaker 1329821a35 Use kotlinx-coroutines-guava in session demo app
I originally tried switching to `Futures.addCallback` (as a follow-up
to Issue: androidx/media#890), but it seemed like a good chance to go further into
Kotlin-ification.

Before this change, if the connection to the session failed, the app
would hang at the 'waiting' screen with nothing logged (and the music
keeps playing). This behaviour is maintained with the `try/catch` around
the `.await()` call (with additional logging). Without this, the failed
connection causes the `PlayerActivity` to crash and the music in the
background stops. The `try/catch` is used to flag to developers who
might be using this app as an example that connecting to the session
may fail, and they may want to handle that.

This change also switches `this.controller` to be `lateinit` instead of
nullable.

Issue: androidx/media#890
PiperOrigin-RevId: 638948568
2024-05-31 01:28:47 -07:00
..
java/androidx/media3/demo/session Use kotlinx-coroutines-guava in session demo app 2024-05-31 01:28:47 -07:00
res Tweak session demo UI strings 2024-05-14 05:34:00 -07:00
AndroidManifest.xml Rollback of 8e2869278c 2024-02-15 02:35:12 -08:00