Skip to content

Commit

Permalink
Going back to 2d mode on Meta Oculus is not supported.
Browse files Browse the repository at this point in the history
  • Loading branch information
twaik committed Jul 17, 2024
1 parent 49ec43a commit 4ac6773
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/src/main/java/com/termux/x11/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -529,12 +529,16 @@ void onPreferencesChanged(String key) {
handler.postDelayed(this::onPreferencesChangedCallback, 100);
}

/** @noinspection CommentedOutCode*/
@SuppressLint("UnsafeIntentLaunch")
void onPreferencesChangedCallback() {
prefs.recheckStoringSecondaryDisplayPreferences();

if (oldXrMode != prefs.xrMode.get() && XrActivity.isSupported() &&
prefs.xrMode.get() != this instanceof XrActivity) {
startActivity(Intent.makeRestartActivityTask(getComponentName()));
/* Going back to 2d mode does not work */
// getBaseContext().startActivity(new Intent(this, MainActivity.class)
// .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK));
finish();
return;
}
Expand Down

0 comments on commit 4ac6773

Please sign in to comment.