From 8d47bf133fed0852a6b093028579ecf6ceaaad0c Mon Sep 17 00:00:00 2001 From: Manuel Martin Date: Mon, 9 Mar 2020 16:07:13 +0100 Subject: [PATCH] Fix for the Pico headset buttons (#2929) * Fix for the Pico headset buttons * Reenable the back button in Pico * Revert "Reenable the back button in Pico" This reverts commit eb1d06e8ea6b42d4278c060844ff01c3d93d1609. --- .../shared/org/mozilla/vrbrowser/ui/OffscreenDisplay.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/OffscreenDisplay.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/OffscreenDisplay.java index f86193834..c779741d3 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/OffscreenDisplay.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/OffscreenDisplay.java @@ -13,10 +13,12 @@ import android.os.Bundle; import android.util.DisplayMetrics; import android.view.Display; +import android.view.KeyEvent; import android.view.Surface; import android.view.View; import android.view.ViewGroup; +import org.mozilla.vrbrowser.VRBrowserActivity; import org.mozilla.vrbrowser.utils.SystemUtils; public class OffscreenDisplay { @@ -132,5 +134,10 @@ public void onCreate(Bundle savedInstanceState) { } catch (Exception e) { } } + + @Override + public boolean dispatchKeyEvent(KeyEvent event) { + return ((VRBrowserActivity)mContext).dispatchKeyEvent(event); + } } }