Merge "SurfaceFlinger: fix no small window displayed in PIP mode of DTVKIT [1/1]" am: cb8eb2be57 am: 5c1bc9bc86 am: 205a70eaf1

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1537927

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I504b91555be57f5a3b6f0d04757ebce136bd9611
diff --git a/services/surfaceflinger/BufferLayer.cpp b/services/surfaceflinger/BufferLayer.cpp
index 424a8b3..39ae2fd 100644
--- a/services/surfaceflinger/BufferLayer.cpp
+++ b/services/surfaceflinger/BufferLayer.cpp
@@ -176,7 +176,14 @@
         if (!holes.isEmpty()) {
             targetSettings.clearRegion.orSelf(holes);
         }
-        return std::nullopt;
+
+        if (mSidebandStream != nullptr) {
+            // For surfaceview of tv sideband, there is no activeBuffer
+            // in bufferqueue, we need return LayerSettings.
+            return result;
+        } else {
+            return std::nullopt;
+        }
     }
     bool blackOutLayer = (isProtected() && !targetSettings.supportsProtectedContent) ||
             (isSecure() && !targetSettings.isSecure);