Commit 711a4596 authored by chirantan's avatar chirantan Committed by Commit bot

chromeos: Clear suspend state information if powerd restarts

Clear internal state information about a pending suspend attempt when
the power manager restarts to prevent chrome from sending bogus messages
to the new power manager.

BUG=none
Signed-off-by: default avatarChirantan Ekbote <chirantan@chromium.org>

Review URL: https://codereview.chromium.org/507803002

Cr-Commit-Position: refs/heads/master@{#292015}
parent c4a3f88c
...@@ -347,6 +347,9 @@ class PowerManagerClientImpl : public PowerManagerClient { ...@@ -347,6 +347,9 @@ class PowerManagerClientImpl : public PowerManagerClient {
<< (old_owner.empty() ? "[none]" : old_owner.c_str()) << (old_owner.empty() ? "[none]" : old_owner.c_str())
<< ", new owner is " << ", new owner is "
<< (new_owner.empty() ? "[none]" : new_owner.c_str()) << ")"; << (new_owner.empty() ? "[none]" : new_owner.c_str()) << ")";
suspend_is_pending_ = false;
pending_suspend_id_ = -1;
suspending_from_dark_resume_ = false;
if (!new_owner.empty()) { if (!new_owner.empty()) {
VLOG(1) << "Sending initial state to power manager"; VLOG(1) << "Sending initial state to power manager";
RegisterSuspendDelays(); RegisterSuspendDelays();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment