summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevin Kim2012-12-07 11:25:06 -0600
committerThe Android Automerger2013-01-22 23:14:40 -0600
commit7d5f33ed55b9511a64d3e73b33366718972f74af (patch)
treeb995bc44b60ac5fa79f220f3326845da9e3bc877
parent3493f18985973e35f83b34b737c8fbcb179007c3 (diff)
downloadplatform-system-core-android-4.2.1_r1.2.tar.gz
platform-system-core-android-4.2.1_r1.2.tar.xz
platform-system-core-android-4.2.1_r1.2.zip
charger: Do not suspend when disconnecting from chargerandroid-4.2.1_r1.2
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)
704 charger->next_screen_transition = -1; 704 charger->next_screen_transition = -1;
705 gr_fb_blank(true); 705 gr_fb_blank(true);
706 LOGV("[%lld] animation done\n", now); 706 LOGV("[%lld] animation done\n", now);
707 request_suspend(true); 707 if (charger->num_supplies_online > 0)
708 request_suspend(true);
708 return; 709 return;
709 } 710 }
710 711