Skip to content

Commit

Permalink
Don't force the Vision Glass app to be fullscreen
Browse files Browse the repository at this point in the history
Remove codesetImmersiveSticky
  • Loading branch information
felipeerias committed Feb 28, 2024
1 parent 92074d4 commit 7119a7b
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions app/src/visionglass/java/com/igalia/wolvic/PlatformActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,6 @@ protected void onResume() {
mActivePresentation.mGLView.onResume();

queueRunnable(activityResumedRunnable);
setImmersiveSticky();
}

@Override
Expand All @@ -349,27 +348,6 @@ protected void onDestroy() {
}
}

void setImmersiveSticky() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
getWindow().setDecorFitsSystemWindows(false);
WindowInsetsController controller = getWindow().getInsetsController();
if (controller != null) {
controller.hide(WindowInsets.Type.statusBars() | WindowInsets.Type.navigationBars());
controller.setSystemBarsBehavior(WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE);
}
} else {
getWindow()
.getDecorView()
.setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_FULLSCREEN
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
}
}

boolean queueRunnable(@NonNull Runnable aRunnable) {
if (mActivePresentation != null) {
mActivePresentation.mGLView.queueEvent(aRunnable);
Expand Down Expand Up @@ -644,9 +622,7 @@ public void onDrawFrame(GL10 gl) {

@Keep
@SuppressWarnings("unused")
private void setRenderMode(final int aMode) {
runOnUiThread(this::setImmersiveSticky);
}
private void setRenderMode(final int aMode) {}

private native void activityCreated(Object aAssetManager);
private native void updateViewport(int width, int height);
Expand Down

0 comments on commit 7119a7b

Please sign in to comment.