Skip to content

Commit

Permalink
Address playstore feedback (#1509)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluemarvin committed Aug 6, 2019
1 parent 4cba16e commit 9bfe4e3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
12 changes: 12 additions & 0 deletions app/src/common/shared/org/mozilla/vrbrowser/VRBrowserActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,18 @@ public boolean dispatchKeyEvent(KeyEvent event) {
}
return result || super.dispatchKeyEvent(event);

} else if (DeviceType.isGoogleVR()) {
boolean result;
switch( event.getKeyCode() ) {
case KeyEvent.KEYCODE_VOLUME_UP:
case KeyEvent.KEYCODE_VOLUME_DOWN:
result = true;
break;
default:
result = super.dispatchKeyEvent(event);
break;
}
return result;
}
return super.dispatchKeyEvent(event);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,8 @@ public static boolean isOculus6DOFBuild() {
public static boolean isWaveBuild() {
return BuildConfig.FLAVOR_platform.toLowerCase().contains("wavevr");
}

public static boolean isGoogleVR() {
return BuildConfig.FLAVOR_platform.toLowerCase().contains("googlevr");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,6 @@ 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

0 comments on commit 9bfe4e3

Please sign in to comment.