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 6d50c98 commit 84af321
Showing 1 changed file with 9 additions and 9 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 disableHeadlockForVR;
private static boolean disabledHeadlockForVR;

public interface NavigationListener {
void onBack();
Expand Down Expand Up @@ -684,9 +684,9 @@ public void onMediaFullScreen(@NonNull WMediaSession mediaSession, boolean aFull

if (mAutoSelectedProjection != VIDEO_PROJECTION_NONE && autoEnter.get()) {
SettingsStore settingsStore = SettingsStore.getInstance(getContext());
if (settingsStore.isHeadLockEnabled() == true) {
if (settingsStore.isHeadLockEnabled()) {
settingsStore.setHeadLockEnabled(false);
disableHeadlockForVR = true;
disabledHeadlockForVR = true;
}

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

if (isInVRVideo()) {
exitVRVideo();
if (disableHeadlockForVR == true) {
if (disabledHeadlockForVR) {
SettingsStore.getInstance(getContext()).setHeadLockEnabled(true);
}
}
Expand Down Expand Up @@ -767,9 +767,9 @@ private void enterFullScreenMode() {
mAttachedWindow.reCenterFrontWindow();
} else {
SettingsStore settingsStore = SettingsStore.getInstance(getContext());
if (settingsStore.isHeadLockEnabled() == true) {
if (settingsStore.isHeadLockEnabled()) {
settingsStore.setHeadLockEnabled(false);
disableHeadlockForVR = true;
disabledHeadlockForVR = true;
}

// Reproject while reproducing VRVideo
Expand All @@ -778,9 +778,9 @@ private void enterFullScreenMode() {
closeFloatingMenus();
} else {
SettingsStore settingsStore = SettingsStore.getInstance(getContext());
if (settingsStore.isHeadLockEnabled() == true) {
if (settingsStore.isHeadLockEnabled()) {
settingsStore.setHeadLockEnabled(false);
disableHeadlockForVR = true;
disabledHeadlockForVR = 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 (disableHeadlockForVR == true) {
if (disabledHeadlockForVR) {
SettingsStore.getInstance(getContext()).setHeadLockEnabled(true);
}
}
Expand Down

0 comments on commit 84af321

Please sign in to comment.