Skip to content

Commit

Permalink
Update widget even if we are not switchSurface
Browse files Browse the repository at this point in the history
So that we can fix the back press exit dialog
displaying when we switched between different panels.

Signed-off-by: Songlin Jiang <[email protected]>
  • Loading branch information
HollowMan6 committed Aug 1, 2023
1 parent 17e8245 commit 3437161
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@ private void unsetView(View view, boolean switchSurface) {
removeView(view);
view.setVisibility(GONE);

float prevDensity = mWidgetPlacement.density;
if (switchSurface) {
setWillNotDraw(true);
if (mTexture != null) {
Expand All @@ -483,11 +484,12 @@ private void unsetView(View view, boolean switchSurface) {
}
mSurface = new Surface(mTexture);
}
float prevDensity = mWidgetPlacement.density;
mWidgetPlacement.density = getBrowserDensity();
mWidgetManager.updateWidget(WindowWidget.this);
mWidgetManager.popWorldBrightness(WindowWidget.this);
mWidgetManager.popBackHandler(mBackHandler);
}
mWidgetManager.updateWidget(WindowWidget.this);
mWidgetManager.popWorldBrightness(WindowWidget.this);
mWidgetManager.popBackHandler(mBackHandler);
if (switchSurface) {
if (mTexture != null) {
resumeCompositor();
}
Expand Down

0 comments on commit 3437161

Please sign in to comment.