summaryrefslogtreecommitdiffstats
path: root/healthd
diff options
context:
space:
mode:
authorTodd Poynor <toddpoynor@google.com>2014-08-18 11:23:11 -0700
committerTodd Poynor <toddpoynor@google.com>2014-08-18 14:32:14 -0700
commit342a2264b96ab05dc8fdbfa8bbe354ce2f4b06ca (patch)
treea1639554c0b1a941237e93f7ecada593f2a437d5 /healthd
parent82b76249fbc339e82ab47a956f7e17160247e4c4 (diff)
downloadsystem_core-342a2264b96ab05dc8fdbfa8bbe354ce2f4b06ca.tar.gz
system_core-342a2264b96ab05dc8fdbfa8bbe354ce2f4b06ca.tar.bz2
system_core-342a2264b96ab05dc8fdbfa8bbe354ce2f4b06ca.zip
healthd: charger: fix check for charger connected to enter suspend
Logic for this check was inadvertently reversed when porting this from the charger daemon to healthd. Request suspend if a charegr is connected, else stay out of suspend waiting for a charger connect or power off if none. Bug: 17112463 Change-Id: Iffdb6dbcd0d0a2a614ff8f50bf5f2e22e1ad552f
Diffstat (limited to 'healthd')
-rw-r--r--healthd/healthd_mode_charger.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/healthd/healthd_mode_charger.cpp b/healthd/healthd_mode_charger.cpp
index 67d494466..345f354ae 100644
--- a/healthd/healthd_mode_charger.cpp
+++ b/healthd/healthd_mode_charger.cpp
@@ -383,7 +383,7 @@ static void update_screen_state(struct charger *charger, int64_t now)
charger->next_screen_transition = -1;
gr_fb_blank(true);
LOGV("[%" PRId64 "] animation done\n", now);
- if (!charger->charger_connected)
+ if (charger->charger_connected)
request_suspend(true);
return;
}