From 5e31e7a004db6c185a8f01129be6433efd929023 Mon Sep 17 00:00:00 2001 From: Yi Jiang Date: Thu, 13 Feb 2025 11:08:29 -0800 Subject: Log snapshot's secure status in SurfaceFlinger dumpsys. Change-Id: Iab5a7ea94b7c2de503c5ec3fa63cd64cde071397 Test: locally verified the logs Flag: EXEMPT log only update Bug: 372558540 --- services/surfaceflinger/FrontEnd/LayerSnapshot.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/services/surfaceflinger/FrontEnd/LayerSnapshot.cpp b/services/surfaceflinger/FrontEnd/LayerSnapshot.cpp index 1514340e50..1f0d5d05a9 100644 --- a/services/surfaceflinger/FrontEnd/LayerSnapshot.cpp +++ b/services/surfaceflinger/FrontEnd/LayerSnapshot.cpp @@ -305,7 +305,11 @@ std::ostream& operator<<(std::ostream& out, const LayerSnapshot& obj) { out << rootId << ","; } } - out << "] " << obj.name << "\n " << (obj.isVisible ? "visible" : "invisible") + out << "] "; + if (obj.isSecure) { + out << "(Secure) "; + } + out << obj.name << "\n " << (obj.isVisible ? "visible" : "invisible") << " reason=" << obj.getIsVisibleReason(); if (!obj.geomLayerBounds.isEmpty()) { -- cgit v1.2.3-59-g8ed1b