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

Commit 7d1c67b

Browse files
authored
Fixes #2861 Fix panels being closed on pause (#3198)
* Fixes NullPointerException * Fix library restore issues
1 parent 799f4b7 commit 7d1c67b

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

app/src/common/shared/org/mozilla/vrbrowser/VRBrowserActivity.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -437,9 +437,6 @@ protected void onPause() {
437437
// Also prevents a deadlock in onDestroy when the BrowserWidget is released.
438438
exitImmersiveSync();
439439
}
440-
// If we are in fullscreen or immersive VR video, we need to consume their back handlers
441-
// before pausing to prevent the windows from getting stuck in fullscreen mode.
442-
flushBackHandlers();
443440

444441
mAudioEngine.pauseEngine();
445442

app/src/common/shared/org/mozilla/vrbrowser/ui/views/VectorClippedEventDelegate.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public boolean onTouch(View v, MotionEvent event) {
138138
}
139139

140140
public boolean isInside(MotionEvent event) {
141-
return mRegion.contains((int)event.getX(),(int) event.getY());
141+
return event != null && mRegion != null && mRegion.contains((int)event.getX(),(int) event.getY());
142142
}
143143

144144
}

app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/NavigationBarWidget.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,8 @@ public void onConfigurationChanged(Configuration newConfig) {
401401
public void onPause() {
402402
super.onPause();
403403
mBinding.navigationBarNavigation.urlBar.onPause();
404+
exitFullScreenMode();
405+
exitVRVideo();
404406
}
405407

406408
@Override
@@ -601,7 +603,7 @@ private void enterFullScreenMode() {
601603
}
602604

603605
private void exitFullScreenMode() {
604-
if (mAttachedWindow == null) {
606+
if (mAttachedWindow == null || !mViewModel.getIsFullscreen().getValue().get()) {
605607
return;
606608
}
607609

app/src/main/res/layout/navigation_bar_fullscreen.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
android:layout_height="wrap_content"
1616
android:layout_gravity="center"
1717
android:background="@drawable/resize_bar_background"
18-
android:visibility="gone">
18+
app:visibleGone="@{viewmodel.isFullscreen}">
1919

2020
<FrameLayout
2121
android:layout_width="5dp"

0 commit comments

Comments
 (0)