Crash: when extending the audio player from the album view
Description
Introduced by a9247254, missed it when merged it yesterday.
When you play a track from the album view and extend the audio player, it will crash
2025-01-28 11:13:52.925 27054-27054 MessageQueue-JNI org.videolan.vlc.debug E java.lang.ClassCastException: com.google.android.material.appbar.CollapsingToolbarLayout$LayoutParams cannot be cast to com.google.android.material.appbar.AppBarLayout$LayoutParams
at org.videolan.vlc.gui.AudioPlayerContainerActivity.updateToolbarScrollability(AudioPlayerContainerActivity.kt:258)
at org.videolan.vlc.gui.AudioPlayerContainerActivity.access$updateToolbarScrollability(AudioPlayerContainerActivity.kt:91)
at org.videolan.vlc.gui.AudioPlayerContainerActivity$initAudioPlayer$3.onStateChanged(AudioPlayerContainerActivity.kt:364)
at com.google.android.material.bottomsheet.BottomSheetBehavior.setStateInternal(BottomSheetBehavior.java:1431)
at com.google.android.material.bottomsheet.BottomSheetBehavior.startSettling(BottomSheetBehavior.java:1825)
at com.google.android.material.bottomsheet.BottomSheetBehavior.access$100(BottomSheetBehavior.java:100)
at com.google.android.material.bottomsheet.BottomSheetBehavior$1.run(BottomSheetBehavior.java:1332)
at com.google.android.material.bottomsheet.BottomSheetBehavior.runAfterLayout(BottomSheetBehavior.java:1342)
at com.google.android.material.bottomsheet.BottomSheetBehavior.setState(BottomSheetBehavior.java:1327)
at org.videolan.vlc.gui.AudioPlayerContainerActivity.slideUpOrDownAudioPlayer(AudioPlayerContainerActivity.kt:621)
at org.videolan.vlc.gui.audio.AudioPlayer$headerMediaSwitcherListener$1.onTouchClick(AudioPlayer.kt:884)
at org.videolan.vlc.gui.view.AudioMediaSwitcher$viewSwitchListener$1.onTouchClick(AudioMediaSwitcher.kt:66)
at org.videolan.vlc.gui.view.FlingViewGroup.onTouchEvent(FlingViewGroup.kt:188)
at android.view.View.dispatchTouchEvent(View.java:15076)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3917)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3581)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3923)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3597)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3923)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3597)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3923)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3597)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3923)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3597)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3923)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3597)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3923)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3597)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3923)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3597)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3923)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3597)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3923)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3597)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3923)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3597)
at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:1016)
at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1962)
at android.app.Activity.dispatchTouchEvent(Activity.java:4265)
at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:70)
at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:974)
at android.view.View.dispatchPointerEvent(View.java:15335)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:7820)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:7593)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6927)
2025-01-28 11:13:52.925 27054-27054 MessageQueue-JNI org.videolan.vlc.debug E at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:6984)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:6950)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:7148)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:6958)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:7205)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6931)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:6984)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:6950)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:6958)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6931)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:10422)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:10270)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:10226)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:10554)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:259)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:335)
at android.os.Looper.loopOnce(Looper.java:186)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8751)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
Steps to reproduce
- Open any album
- Play one track
- extend the audio player
Context
App version
3.6.2 (after version bump, not present in the release)
Android version
12
Device model
Samsung s10e
App mode
Smartphone