surfaceflinger: Fix -Wunused-variable compiler warning
Test: presubmit
Change-Id: I72a7d888cbaee4dd782ec43c1fc130669d9eb2ac
diff --git a/services/surfaceflinger/Scheduler/Scheduler.cpp b/services/surfaceflinger/Scheduler/Scheduler.cpp
index 68927bd..54ff2cd 100644
--- a/services/surfaceflinger/Scheduler/Scheduler.cpp
+++ b/services/surfaceflinger/Scheduler/Scheduler.cpp
@@ -577,7 +577,8 @@
if (!scheduleOpt) return;
const auto& schedule = scheduleOpt->get();
- if (const bool needMoreSignals = schedule->getController().addPresentFence(std::move(fence))) {
+ const bool needMoreSignals = schedule->getController().addPresentFence(std::move(fence));
+ if (needMoreSignals) {
schedule->enableHardwareVsync();
} else {
constexpr bool kDisallow = false;