Browse files

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
  • Loading branch information...
1 parent 3493f18 commit 7d5f33ed55b9511a64d3e73b33366718972f74af Devin Kim committed with The Android Automerger Dec 7, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 charger/charger.c
@@ -704,7 +704,8 @@ static void update_screen_state(struct charger *charger, int64_t now)
charger->next_screen_transition = -1;
LOGV("[%lld] animation done\n", now);
- request_suspend(true);
+ if (charger->num_supplies_online > 0)
+ request_suspend(true);

0 comments on commit 7d5f33e

Please sign in to comment.