Pretend to be having the original background

...as otherwise setWindowBackground(bg) => bg == dv.getBackground
property is violated.

Test: WindowTest
Fixes: 130170137
Change-Id: I21dc45b291fd2568355ff186966a910cd05ed994
This commit is contained in:
Jorim Jaggi
2019-04-09 15:16:23 +02:00
parent 462864489a
commit 1ab06de89f

View File

@@ -627,7 +627,7 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
drawingBounds.bottom -= framePadding.bottom - frameOffsets.bottom;
}
Drawable bg = getBackground();
Drawable bg = super.getBackground();
if (bg != null) {
bg.setBounds(drawingBounds);
}
@@ -1235,6 +1235,11 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
mLastOriginalBackgroundDrawable = mOriginalBackgroundDrawable;
}
@Override
public Drawable getBackground() {
return mOriginalBackgroundDrawable;
}
private int calculateStatusBarColor() {
return calculateBarColor(mWindow.getAttributes().flags, FLAG_TRANSLUCENT_STATUS,
mSemiTransparentBarColor, mWindow.mStatusBarColor);