summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevin Kim <dojip.kim@lge.com>2012-12-07 09:25:06 -0800
committerIliyan Malchev <malchev@google.com>2012-12-07 10:13:51 -0800
commitfd8e6504e355d2c73a2aaad260475f72af0495bf (patch)
tree378bf0b383a390eae2d6438d201a0a6585a3d91b
parent40156b8a91363da69675e7e4cb7947c371871654 (diff)
downloadcore-fd8e6504e355d2c73a2aaad260475f72af0495bf.tar.gz
charger: Do not suspend when disconnecting from charger
The device should be power off when disconnecting from charger. If the device enter to suspend, the device couldn't handle the power off process. So the device shouldn't suspend to handle the power off at that time Bug: 7429504 Change-Id: I9a0a60e53f315cd83550dc730a33bc7bd464ef67
-rw-r--r--charger/charger.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/charger/charger.c b/charger/charger.c
index 25b3b1aaf..353bdf086 100644
--- a/charger/charger.c
+++ b/charger/charger.c
@@ -704,7 +704,8 @@ static void update_screen_state(struct charger *charger, int64_t now)
charger->next_screen_transition = -1;
gr_fb_blank(true);
LOGV("[%lld] animation done\n", now);
- request_suspend(true);
+ if (charger->num_supplies_online > 0)
+ request_suspend(true);
return;
}