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
This commit is contained in:
Devin Kim 2012-12-07 09:25:06 -08:00 committed by The Android Automerger
parent 3493f18985
commit 7d5f33ed55
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}