From 9b9d7c6c0b6643f7eb69f4a49746ef7428071636 Mon Sep 17 00:00:00 2001 From: Imanol Fernandez Date: Thu, 14 May 2020 19:09:00 +0200 Subject: [PATCH] Prevent duplicated setActive(false) calls (#3376) --- .../org/mozilla/vrbrowser/browser/engine/Session.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/common/shared/org/mozilla/vrbrowser/browser/engine/Session.java b/app/src/common/shared/org/mozilla/vrbrowser/browser/engine/Session.java index 02b6117c5..f234ff47d 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/browser/engine/Session.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/browser/engine/Session.java @@ -767,6 +767,12 @@ public void goForward() { } public void setActive(boolean aActive) { + if (!aActive && mState.mSession != null && !mState.isActive()) { + // Prevent duplicated setActive(false) calls. There is a GV + // bug that makes the session not to be resumed correctly. + // See https://github.com/MozillaReality/FirefoxReality/issues/3375. + return; + } // Flush the events queued while the session was inactive if (mState.mSession != null && !mState.isActive() && aActive) { flushQueuedEvents();