Skip to content

Commit

Permalink
Discard back button presses to exit the app in WaveVR and Daydream
Browse files Browse the repository at this point in the history
  • Loading branch information
MortimerGoro committed Mar 12, 2019
1 parent 9d14121 commit 45af25e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,13 @@ private void notifyPendingEvents() {
}
}

@Override
public void onBackPressed() {
// Discard back button presses that would otherwise exit the app,
// as the UI standard on this platform is to require the use of
// the Daydream button to exit application.
}

private native void activityCreated(Object aAssetManager, final long aContext);
private native void activityPaused();
private native void activityResumed();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ public void run() {
});
}

@Override
public void onBackPressed() {
// Discard back button presses that would otherwise exit the app,
// as the UI standard on this platform is to require the use of
// the system menu to exit applications.
}

protected native void queueRunnable(Runnable aRunnable);
protected native void initializeJava(AssetManager aAssets);
}

0 comments on commit 45af25e

Please sign in to comment.