Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Fixes #2861 Fix panels being closed on pause #3198

Merged
merged 2 commits into from
Apr 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -600,7 +602,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