From a4d2fefcf660a10b3a5ef3642ccd2eea0114679a Mon Sep 17 00:00:00 2001 From: griffinf Date: Thu, 27 Jun 2024 12:44:56 -0700 Subject: [PATCH] [APT-10204] Add default value when getting armadillo config from bundle --- .../java/com/scribd/armadillo/playback/MediaSessionCallback.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Armadillo/src/main/java/com/scribd/armadillo/playback/MediaSessionCallback.kt b/Armadillo/src/main/java/com/scribd/armadillo/playback/MediaSessionCallback.kt index 0fdd9f0..f6cd637 100644 --- a/Armadillo/src/main/java/com/scribd/armadillo/playback/MediaSessionCallback.kt +++ b/Armadillo/src/main/java/com/scribd/armadillo/playback/MediaSessionCallback.kt @@ -134,7 +134,7 @@ internal class MediaSessionCallback(private val onMediaSessionEventListener: OnM onStop() } - val config = extras.getSerializable(Constants.Keys.KEY_ARMADILLO_CONFIG) as ArmadilloConfiguration + val config = extras.getSerializable(Constants.Keys.KEY_ARMADILLO_CONFIG) as ArmadilloConfiguration? ?: ArmadilloConfiguration() Log.v(TAG, "ArmadilloConfiguration: $config") playbackEngine = playbackEngineFactory.createPlaybackEngine(newAudioPlayable) playbackEngine?.beginPlayback(config)