Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit e083e4b

Browse files
authored
Do not resume compositor when WebVR is exited after suspending the app (#3048)
1 parent 7311bdc commit e083e4b

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

app/src/common/shared/org/mozilla/vrbrowser/VRBrowserActivity.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -973,8 +973,11 @@ void resumeGeckoViewCompositor() {
973973
GleanMetricsService.stopImmersive();
974974
Handler handler = new Handler(Looper.getMainLooper());
975975
handler.postDelayed(() -> {
976-
mWindows.resumeCompositor();
977-
Log.d(LOGTAG, "Compositor Resumed");
976+
if (!mWindows.isPaused()) {
977+
Log.d(LOGTAG, "Compositor resume begin");
978+
mWindows.resumeCompositor();
979+
Log.d(LOGTAG, "Compositor resume end");
980+
}
978981
}, 20);
979982
}
980983

app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/Windows.java

+4
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,10 @@ public void onResume() {
458458
TelemetryWrapper.resetOpenedWindowsCount(mPrivateWindows.size(), true);
459459
}
460460

461+
public boolean isPaused() {
462+
return mIsPaused;
463+
}
464+
461465
public void onDestroy() {
462466
if (mTabsWidget != null && !mTabsWidget.isReleased()) {
463467
mTabsWidget.releaseWidget();

0 commit comments

Comments
 (0)