diff options
Diffstat (limited to 'Benchmark.cpp')
-rw-r--r-- | Benchmark.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Benchmark.cpp b/Benchmark.cpp index 9548956f..b0a3b856 100644 --- a/Benchmark.cpp +++ b/Benchmark.cpp @@ -181,7 +181,7 @@ static status_t benchmarkInternal(const std::string& rootPath, void Benchmark(const std::string& path, const android::sp<android::os::IVoldTaskListener>& listener) { std::lock_guard<std::mutex> lock(kBenchmarkLock); - android::power::WakeLock wl{kWakeLock}; + acquire_wake_lock(PARTIAL_WAKE_LOCK, kWakeLock); PerformanceBoost boost; android::os::PersistableBundle extras; @@ -190,6 +190,8 @@ void Benchmark(const std::string& path, if (listener) { listener->onFinished(res, extras); } + + release_wake_lock(kWakeLock); } } // namespace vold |