Crash fix
This commit is contained in:
parent
c46bd5ceba
commit
0312fa6f63
1 changed files with 6 additions and 2 deletions
|
|
@ -273,8 +273,12 @@ public class PlayerFragment extends AbsPlayerFragment implements PlayerAlbumCove
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBackPressed() {
|
public boolean onBackPressed() {
|
||||||
boolean wasExpanded = slidingUpPanelLayout.getPanelState() == SlidingUpPanelLayout.PanelState.EXPANDED;
|
boolean wasExpanded = false;
|
||||||
slidingUpPanelLayout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED);
|
if (slidingUpPanelLayout != null) {
|
||||||
|
wasExpanded = slidingUpPanelLayout.getPanelState() == SlidingUpPanelLayout.PanelState.EXPANDED;
|
||||||
|
slidingUpPanelLayout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED);
|
||||||
|
}
|
||||||
|
|
||||||
return wasExpanded;
|
return wasExpanded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue