TimeStats: remove the regex checks on layer name
This change removes the regex validation on the layer name. Instead, now we just
check if the layer name meets the minimum length requirement set in TimeStats,
as well as filtering out the PopupWindow layer names.
This change also removes the regex extraction for the package name. It's not
making sense to do that in the platform. After we have the authenticated package
name from WindowManager, we can upload the package name info again.
Bug: 140266250
Test: atest libsurfaceflinger_unittest:TimeStatsTest
Change-Id: I476bb2a81c2a0d1e99663f4e0fe78cc3e6cf7f6b
diff --git a/services/surfaceflinger/tests/unittests/TimeStatsTest.cpp b/services/surfaceflinger/tests/unittests/TimeStatsTest.cpp
index dee2cae..4eb9ec3 100644
--- a/services/surfaceflinger/tests/unittests/TimeStatsTest.cpp
+++ b/services/surfaceflinger/tests/unittests/TimeStatsTest.cpp
@@ -171,7 +171,7 @@
}
static std::string genLayerName(int32_t layerID) {
- return (layerID < 0 ? "invalid.dummy" : "com.dummy#") + std::to_string(layerID);
+ return (layerID < 0 ? "PopupWindow:b54fcd1#0" : "com.dummy#") + std::to_string(layerID);
}
void TimeStatsTest::setTimeStamp(TimeStamp type, int32_t id, uint64_t frameNumber, nsecs_t ts) {