Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ class WindowsState {
private Accounts mAccounts;
private Services mServices;
private PromptDialogWidget mNoInternetDialog;
private boolean mCompositorPaused = false;

private enum PanelType {
NONE,
Expand Down Expand Up @@ -428,6 +429,10 @@ public void focusWindow(@Nullable WindowWidget aWindow) {
}

public void pauseCompositor() {
if (mCompositorPaused) {
return;
}
mCompositorPaused = true;
for (WindowWidget window: mRegularWindows) {
window.pauseCompositor();
}
Expand All @@ -437,6 +442,10 @@ public void pauseCompositor() {
}

public void resumeCompositor() {
if (!mCompositorPaused) {
return;
}
mCompositorPaused = false;
for (WindowWidget window: mRegularWindows) {
window.resumeCompositor();
}
Expand All @@ -453,6 +462,9 @@ public void onPause() {

public void onResume() {
mIsPaused = false;
if (mCompositorPaused) {
resumeCompositor();
}

TelemetryWrapper.resetOpenedWindowsCount(mRegularWindows.size(), false);
TelemetryWrapper.resetOpenedWindowsCount(mPrivateWindows.size(), true);
Expand Down