Merge "Excessive battery usage fix." into rvc-qpr-dev

This commit is contained in:
TreeHugger Robot
2020-09-24 07:45:31 +00:00
committed by Android (Google) Code Review

View File

@@ -306,6 +306,7 @@ IncrementalService::~IncrementalService() {
}
mJobCondition.notify_all();
mJobProcessor.join();
mLooper->wake();
mCmdLooperThread.join();
mTimedQueue->stop();
// Ensure that mounts are destroyed while the service is still valid.
@@ -1378,7 +1379,7 @@ bool IncrementalService::mountExistingImage(std::string_view root) {
}
void IncrementalService::runCmdLooper() {
constexpr auto kTimeoutMsecs = 1000;
constexpr auto kTimeoutMsecs = -1;
while (mRunning.load(std::memory_order_relaxed)) {
mLooper->pollAll(kTimeoutMsecs);
}