This repository was archived by the owner on Jul 22, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
app/src/common/shared/org/mozilla/vrbrowser/ui/widgets Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -152,11 +152,15 @@ private void initialize(@NonNull Context aContext) {
152152
153153 mNavigationListeners = new ArrayList <>();
154154
155- mFullScreenBackHandler = this ::exitFullScreenMode ;
155+ mFullScreenBackHandler = () -> {
156+ if (mAttachedWindow != null ) {
157+ mAttachedWindow .setIsFullScreen (false );
158+ }
159+ };
156160 mVRVideoBackHandler = () -> {
157161 exitVRVideo ();
158- if (mViewModel . getAutoEnteredVRVideo (). getValue (). get () ) {
159- exitFullScreenMode ( );
162+ if (mAttachedWindow != null ) {
163+ mAttachedWindow . setIsFullScreen ( false );
160164 }
161165 };
162166
@@ -278,7 +282,9 @@ private void updateUI() {
278282
279283 mBinding .navigationBarFullscreen .fullScreenExitButton .setOnClickListener (view -> {
280284 view .requestFocusFromTouch ();
281- exitFullScreenMode ();
285+ if (mAttachedWindow != null ) {
286+ mAttachedWindow .setIsFullScreen (false );
287+ }
282288 if (mAudio != null ) {
283289 mAudio .playSound (AudioEngine .Sound .CLICK );
284290 }
@@ -601,7 +607,7 @@ private void enterFullScreenMode() {
601607 }
602608
603609 private void exitFullScreenMode () {
604- if (mAttachedWindow == null || ! mViewModel . getIsFullscreen (). getValue (). get () ) {
610+ if (mAttachedWindow == null ) {
605611 return ;
606612 }
607613
You can’t perform that action at this time.
0 commit comments