Apply letterbox changes when background color changes.
Fix: 179380577 Test: atest LetterboxTest Change-Id: Ieedbb2a30bd66ee1aa474eed9e5c9b013520a838
This commit is contained in:
@@ -340,7 +340,7 @@ public class Letterbox {
|
||||
}
|
||||
|
||||
public void applySurfaceChanges(SurfaceControl.Transaction t) {
|
||||
if (mSurfaceFrameRelative.equals(mLayoutFrameRelative)) {
|
||||
if (!needsApplySurfaceChanges()) {
|
||||
// Nothing changed.
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user