SF: Fully disable content detection if opted out
Layer history was created but not recorded/traversed on devices without
refresh rate switching. ag/9549429 destroys stale history on traversal,
so the LayerInfo records were leaked.
Bug: 144363590
Test: Layer history is not created on crosshatch
Change-Id: I45ebc7c4f8447b2bc2bfb1af01325d562b4afed1
diff --git a/services/surfaceflinger/Scheduler/OneShotTimer.cpp b/services/surfaceflinger/Scheduler/OneShotTimer.cpp
index 4870a3b..a90d05e 100644
--- a/services/surfaceflinger/Scheduler/OneShotTimer.cpp
+++ b/services/surfaceflinger/Scheduler/OneShotTimer.cpp
@@ -17,6 +17,7 @@
#include "OneShotTimer.h"
#include <chrono>
+#include <sstream>
#include <thread>
namespace android {
@@ -98,7 +99,7 @@
mTimeoutCallback();
}
}
-} // namespace scheduler
+}
void OneShotTimer::reset() {
{
@@ -108,5 +109,11 @@
mCondition.notify_all();
}
+std::string OneShotTimer::dump() const {
+ std::ostringstream stream;
+ stream << mInterval.count() << " ms";
+ return stream.str();
+}
+
} // namespace scheduler
} // namespace android