Introduce eCanOccludePresentation layer flag

Sets a property on a layer hierarchy indicating that its visible region
should be considered when computing TrustedPresentation
Thresholds. This property is set on a layer and inherited by all its
children. The property is then passed via windowinfos so the
TrustedPresentation controller can determine which windows to
use when computing the thresholds.

Test: presubmit
Bug: b/275574214
Change-Id: Ide384c64cb7b5a9b2b3ce293b20e2be64da8ad69
diff --git a/services/surfaceflinger/FrontEnd/LayerSnapshot.cpp b/services/surfaceflinger/FrontEnd/LayerSnapshot.cpp
index 38974a2..3ef9e69 100644
--- a/services/surfaceflinger/FrontEnd/LayerSnapshot.cpp
+++ b/services/surfaceflinger/FrontEnd/LayerSnapshot.cpp
@@ -315,6 +315,7 @@
     if (obj.hasInputInfo()) {
         out << "\n    input{"
             << "(" << obj.inputInfo.inputConfig.string() << ")";
+        if (obj.inputInfo.canOccludePresentation) out << " canOccludePresentation";
         if (obj.touchCropId != UNASSIGNED_LAYER_ID) out << " touchCropId=" << obj.touchCropId;
         if (obj.inputInfo.replaceTouchableRegionWithCrop) out << " replaceTouchableRegionWithCrop";
         auto touchableRegion = obj.inputInfo.touchableRegion.getBounds();