Merge "BatteryStats: explicitly copy the wakeup reasons"

This commit is contained in:
Treehugger Robot
2020-11-24 19:44:56 +00:00
committed by Gerrit Code Review

View File

@@ -124,7 +124,7 @@ public:
{
std::unique_lock<std::mutex> reasonsLock(mReasonsMutex, std::defer_lock);
if (reasonsLock.try_lock() && mWakeupReasons.empty()) {
mWakeupReasons = std::move(wakeupReasons);
mWakeupReasons = wakeupReasons;
reasonsCaptured = true;
}
}