Skip to content

Commit

Permalink
Fixes #2861 Fix panels being closed on pause (#3198)
Browse files Browse the repository at this point in the history
* Fixes NullPointerException

* Fix library restore issues
  • Loading branch information
keianhzo committed Apr 20, 2020
1 parent 799f4b7 commit 7d1c67b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,6 @@ protected void onPause() {
// Also prevents a deadlock in onDestroy when the BrowserWidget is released.
exitImmersiveSync();
}
// If we are in fullscreen or immersive VR video, we need to consume their back handlers
// before pausing to prevent the windows from getting stuck in fullscreen mode.
flushBackHandlers();

mAudioEngine.pauseEngine();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public boolean onTouch(View v, MotionEvent event) {
}

public boolean isInside(MotionEvent event) {
return mRegion.contains((int)event.getX(),(int) event.getY());
return event != null && mRegion != null && mRegion.contains((int)event.getX(),(int) event.getY());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,8 @@ public void onConfigurationChanged(Configuration newConfig) {
public void onPause() {
super.onPause();
mBinding.navigationBarNavigation.urlBar.onPause();
exitFullScreenMode();
exitVRVideo();
}

@Override
Expand Down Expand Up @@ -601,7 +603,7 @@ private void enterFullScreenMode() {
}

private void exitFullScreenMode() {
if (mAttachedWindow == null) {
if (mAttachedWindow == null || !mViewModel.getIsFullscreen().getValue().get()) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/navigation_bar_fullscreen.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@drawable/resize_bar_background"
android:visibility="gone">
app:visibleGone="@{viewmodel.isFullscreen}">

<FrameLayout
android:layout_width="5dp"
Expand Down

0 comments on commit 7d1c67b

Please sign in to comment.