Remove call to setLayerStack for BlackFrame Surface

There's no need for the black frame to call setLayerStack since it's a
child of the overlay layer. Calling setLayerStack does nothing, but it
will produce an error message in SurfaceFlinger since the caller is
trying to set a specified layerStack on a layer that's not the root.
Deleting thihs code to remove the error spam in logcat.

Also removed it from the Watermark code since it's also a child of the
overlay layer.

Bug: 144824244
Test: No more error log about invalid layerStack in SF
Change-Id: I2f64d50d81af9caf8debe289c4a8eda7c2a61031
This commit is contained in:
chaviw
2019-11-22 10:16:45 -08:00
parent 2bbbdead1c
commit deb69378a5
2 changed files with 1 additions and 3 deletions

View File

@@ -52,7 +52,6 @@ public class BlackFrame {
.setParent(surfaceControl)
.build();
transaction.setWindowCrop(surface, w, h);
transaction.setLayerStack(surface, dc.getDisplayId());
transaction.setAlpha(surface, 1);
transaction.setLayer(surface, layer);
transaction.setPosition(surface, left, top);

View File

@@ -121,8 +121,7 @@ class Watermark {
.setBufferSize(1, 1)
.setFormat(PixelFormat.TRANSLUCENT)
.build();
t.setLayerStack(ctrl, mDisplay.getLayerStack())
.setLayer(ctrl, WindowManagerService.TYPE_LAYER_MULTIPLIER * 100)
t.setLayer(ctrl, WindowManagerService.TYPE_LAYER_MULTIPLIER * 100)
.setPosition(ctrl, 0, 0)
.show(ctrl);
mSurface.copyFrom(ctrl);