[sf] add a backdoor to disable transaction tracing
Test: adb shell service call SurfaceFlinger 1041 i32 -1
Bug: 298240242
Change-Id: If07b1d538d6ae1ec43b8611183085741c281c089
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index fadde51..d5b1140 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -7027,7 +7027,10 @@
}
case 1041: { // Transaction tracing
if (mTransactionTracing) {
- if (data.readInt32()) {
+ int arg = data.readInt32();
+ if (arg == -1) {
+ mTransactionTracing.reset();
+ } else if (arg > 0) {
// Transaction tracing is always running but allow the user to temporarily
// increase the buffer when actively debugging.
mTransactionTracing->setBufferSize(