SF: initialize the debug variable for 1035 backdoor
The commit f1833853ccc1a54dcc7056a9f87eefa1baccc945 unexpectedly removes
initialization of the variable mDebugDisplayModeSetByBackdoor, which is
needed to ensure 1035 backdoor transaction always be effective without
depending on previous call result.
Bug: 192129895
Test: service call SurfaceFlinger 1035 i32 <mode> i64 <display-id>
Signed-off-by: Shiyong Li <shiyongli@google.com>
Change-Id: I7a027b9db51389f48cf0745eb0adde8b71312e1b
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 38b8ef1..f7f942f 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -5674,6 +5674,7 @@
return nullptr;
}();
+ mDebugDisplayModeSetByBackdoor = false;
const status_t result = setActiveMode(display, modeId);
mDebugDisplayModeSetByBackdoor = result == NO_ERROR;
return result;