Skip to content

Commit

Permalink
Nit
Browse files Browse the repository at this point in the history
  • Loading branch information
haanhvu committed Jan 30, 2025
1 parent 84af321 commit c6af004
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public class NavigationBarWidget extends UIWidget implements WSession.Navigation
private static final int POPUP_NOTIFICATION_ID = 3;
private static final int WEB_APP_ADDED_NOTIFICATION_ID = 4;

private static boolean disabledHeadlockForVR;
private static boolean disabledHeadlockForVRVideo;

public interface NavigationListener {
void onBack();
Expand Down Expand Up @@ -686,7 +686,7 @@ public void onMediaFullScreen(@NonNull WMediaSession mediaSession, boolean aFull
SettingsStore settingsStore = SettingsStore.getInstance(getContext());
if (settingsStore.isHeadLockEnabled()) {
settingsStore.setHeadLockEnabled(false);
disabledHeadlockForVR = true;
disabledHeadlockForVRVideo = true;
}

mViewModel.setAutoEnteredVRVideo(true);
Expand All @@ -704,7 +704,7 @@ public void onMediaFullScreen(@NonNull WMediaSession mediaSession, boolean aFull

if (isInVRVideo()) {
exitVRVideo();
if (disabledHeadlockForVR) {
if (disabledHeadlockForVRVideo) {
SettingsStore.getInstance(getContext()).setHeadLockEnabled(true);
}
}
Expand Down Expand Up @@ -769,7 +769,7 @@ private void enterFullScreenMode() {
SettingsStore settingsStore = SettingsStore.getInstance(getContext());
if (settingsStore.isHeadLockEnabled()) {
settingsStore.setHeadLockEnabled(false);
disabledHeadlockForVR = true;
disabledHeadlockForVRVideo = true;
}

// Reproject while reproducing VRVideo
Expand All @@ -780,7 +780,7 @@ private void enterFullScreenMode() {
SettingsStore settingsStore = SettingsStore.getInstance(getContext());
if (settingsStore.isHeadLockEnabled()) {
settingsStore.setHeadLockEnabled(false);
disabledHeadlockForVR = true;
disabledHeadlockForVRVideo = true;
}
enterVRVideo(projection);
}
Expand Down Expand Up @@ -1019,7 +1019,7 @@ private void exitVRVideo() {
// Reposition UI in front of the user when exiting a VR video.
mWidgetManager.recenterUIYaw(WidgetManagerDelegate.YAW_TARGET_ALL);

if (disabledHeadlockForVR) {
if (disabledHeadlockForVRVideo) {
SettingsStore.getInstance(getContext()).setHeadLockEnabled(true);
}
}
Expand Down

0 comments on commit c6af004

Please sign in to comment.