Allow child layers to unset trusted overlay state 2/2
Test: presubmit
Bug: 339701674
Change-Id: I1a94b5e5dc1fa64a9e1eb3330b5c5b03af8d2b16
diff --git a/services/surfaceflinger/LayerProtoHelper.cpp b/services/surfaceflinger/LayerProtoHelper.cpp
index 753886a..496033b 100644
--- a/services/surfaceflinger/LayerProtoHelper.cpp
+++ b/services/surfaceflinger/LayerProtoHelper.cpp
@@ -382,7 +382,8 @@
layerInfo->set_corner_radius(
(snapshot.roundedCorner.radius.x + snapshot.roundedCorner.radius.y) / 2.0);
layerInfo->set_background_blur_radius(snapshot.backgroundBlurRadius);
- layerInfo->set_is_trusted_overlay(snapshot.isTrustedOverlay);
+ layerInfo->set_is_trusted_overlay(snapshot.trustedOverlay == gui::TrustedOverlay::ENABLED);
+ // TODO(b/339701674) update protos
LayerProtoHelper::writeToProtoDeprecated(transform, layerInfo->mutable_transform());
LayerProtoHelper::writePositionToProto(transform.tx(), transform.ty(),
[&]() { return layerInfo->mutable_position(); });