Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure that compositor is resumed after onResume #3141

Merged
merged 1 commit into from
Apr 9, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
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