playback: fix playback sheet hiding on pre-U back

Caused by a missed check.
This commit is contained in:
Alexander Capehart 2025-02-10 13:59:00 -07:00
parent 9632e06ca6
commit 3efd4ea59f
No known key found for this signature in database
GPG key ID: 37DBE3621FE9AD47

View file

@ -1633,12 +1633,13 @@ public class BackportBottomSheetBehavior<V extends View> extends CoordinatorLayo
return;
}
BackEventCompat backEvent = bottomContainerBackHelper.onHandleBackInvoked();
boolean canActuallyHide = hideable && isHideableWhenDragging();
if (backEvent == null || VERSION.SDK_INT < VERSION_CODES.UPSIDE_DOWN_CAKE) {
// If using traditional button system nav or if pre-U, just hide or collapse the bottom sheet.
setState(hideable ? STATE_HIDDEN : STATE_COLLAPSED);
setState(canActuallyHide ? STATE_HIDDEN : STATE_COLLAPSED);
return;
}
if (hideable && isHideableWhenDragging()) {
if (canActuallyHide) {
bottomContainerBackHelper.finishBackProgressNotPersistent(
backEvent,
new AnimatorListenerAdapter() {