BatteryStats: explicitly copy the wakeup reasons
As the wakeup reasons received from binder callback are in const reference, std::move the parameter will result in a copy operation in order to fulfill the const restriction. Update to reflect this explicitly. Test: adb shell dumpsys batterystats --history Bug: 173165219 Change-Id: I6ab995cc11600b37123651bacc2015a3bf1a4bf6
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user