SF TimeStats: Add co. package domain
I've found popular games using co. started package name. This change
will add this into the accepted names.
Test: dumpsys SurfaceFlinger --timestats <see go/sf-timestats for args>
Bug: b/70388650
Change-Id: I8c797779bfbffe0261140ad5931730c30ddd3e8d
diff --git a/services/surfaceflinger/TimeStats/TimeStats.cpp b/services/surfaceflinger/TimeStats/TimeStats.cpp
index d4f1e29..a6f2b3f 100644
--- a/services/surfaceflinger/TimeStats/TimeStats.cpp
+++ b/services/surfaceflinger/TimeStats/TimeStats.cpp
@@ -225,12 +225,12 @@
// This regular expression captures the following layer names for instance:
// 1) StatusBat#0
// 2) NavigationBar#1
- // 3) com.*#0
- // 4) SurfaceView - com.*#0
- // Using [-\\s\t]+ for the conjunction part between SurfaceView and com.* is
- // a bit more robust in case there's a slight change.
+ // 3) co(m).*#0
+ // 4) SurfaceView - co(m).*#0
+ // Using [-\\s\t]+ for the conjunction part between SurfaceView and co(m).*
+ // is a bit more robust in case there's a slight change.
// The layer name would only consist of . / $ _ 0-9 a-z A-Z in most cases.
- std::regex re("(((SurfaceView[-\\s\\t]+)?com\\.[./$\\w]+)|((Status|Navigation)Bar))#\\d+");
+ std::regex re("(((SurfaceView[-\\s\\t]+)?com?\\.[./$\\w]+)|((Status|Navigation)Bar))#\\d+");
return std::regex_match(layerName.begin(), layerName.end(), re);
}