From deb69378a55c665aa0ddd09d71e7d776fdf7e9d6 Mon Sep 17 00:00:00 2001 From: chaviw Date: Fri, 22 Nov 2019 10:16:45 -0800 Subject: [PATCH] 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 --- services/core/java/com/android/server/wm/BlackFrame.java | 1 - services/core/java/com/android/server/wm/Watermark.java | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/services/core/java/com/android/server/wm/BlackFrame.java b/services/core/java/com/android/server/wm/BlackFrame.java index b4cecff728fd1..8ab17950f4fc4 100644 --- a/services/core/java/com/android/server/wm/BlackFrame.java +++ b/services/core/java/com/android/server/wm/BlackFrame.java @@ -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); diff --git a/services/core/java/com/android/server/wm/Watermark.java b/services/core/java/com/android/server/wm/Watermark.java index 725aaa48c6451..4e1b2177c87cc 100644 --- a/services/core/java/com/android/server/wm/Watermark.java +++ b/services/core/java/com/android/server/wm/Watermark.java @@ -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);