Fixed a situation when background playback could use a video stream instead of an audio stream

This commit is contained in:
Avently 2020-07-22 02:20:58 +03:00
parent eda6641e3f
commit 44d21d677b
2 changed files with 30 additions and 16 deletions

View file

@ -2164,10 +2164,10 @@ public class VideoDetailFragment
@Override
public void onStateChanged(@NonNull final View bottomSheet, final int newState) {
bottomSheetState = newState;
ViewGroup mainFragment = requireActivity().findViewById(R.id.fragment_holder);
final ViewGroup mainFragment = requireActivity().findViewById(R.id.fragment_holder);
switch (newState) {
case BottomSheetBehavior.STATE_HIDDEN:
mainFragment.setDescendantFocusability(ViewGroup.FOCUS_AFTER_DESCENDANTS);
bottomSheetBehavior.setPeekHeight(0);
cleanUp();
break;