Show task background surface

It should be visible behind activity contents to draw stuff when task
resized while the activity is still resizing.

Bug: 241601214
Test: It shows behind activity contents.
Change-Id: I88af4d5b334223b6c4c4d4403d4a23e8fd56becf
This commit is contained in:
Garfield Tan
2022-08-05 16:12:08 -07:00
parent 38215c1dba
commit d619a94cb5
2 changed files with 5 additions and 1 deletions

View File

@@ -233,7 +233,9 @@ public abstract class WindowDecoration<T extends View & TaskFocusStateConsumer>
mTmpColor[2] = (float) Color.blue(backgroundColorInt) / 255.f;
startT.setWindowCrop(mTaskBackgroundSurface, taskBounds.width(), taskBounds.height())
.setShadowRadius(mTaskBackgroundSurface, shadowRadius)
.setColor(mTaskBackgroundSurface, mTmpColor);
.setColor(mTaskBackgroundSurface, mTmpColor)
.setLayer(mTaskBackgroundSurface, -1)
.show(mTaskBackgroundSurface);
// Caption view
mCaptionWindowManager.setConfiguration(taskConfig);

View File

@@ -204,6 +204,8 @@ public class WindowDecorationTests extends ShellTestCase {
verify(mMockSurfaceControlStartT)
.setColor(taskBackgroundSurface, new float[] {1.f, 1.f, 0.f});
verify(mMockSurfaceControlStartT).setShadowRadius(taskBackgroundSurface, 10);
verify(mMockSurfaceControlStartT).setLayer(taskBackgroundSurface, -1);
verify(mMockSurfaceControlStartT).show(taskBackgroundSurface);
verify(mMockSurfaceControlViewHostFactory)
.create(any(), eq(defaultDisplay), any(), anyBoolean());