Apply letterbox changes when background color changes.

Fix: 179380577
Test: atest LetterboxTest
Change-Id: Ieedbb2a30bd66ee1aa474eed9e5c9b013520a838
This commit is contained in:
Mariia Sandrikova
2021-02-04 17:38:16 +00:00
parent 51158471ae
commit 1293f319cd
2 changed files with 5 additions and 1 deletions

View File

@@ -340,7 +340,7 @@ public class Letterbox {
}
public void applySurfaceChanges(SurfaceControl.Transaction t) {
if (mSurfaceFrameRelative.equals(mLayoutFrameRelative)) {
if (!needsApplySurfaceChanges()) {
// Nothing changed.
return;
}

View File

@@ -183,6 +183,10 @@ public class LetterboxTest {
mColor = Color.GREEN;
assertTrue(mLetterbox.needsApplySurfaceChanges());
mLetterbox.applySurfaceChanges(mTransaction);
verify(mTransaction).setColor(mSurfaces.top, new float[]{0, 1, 0});
}
@Test