summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThe Android Automerger2011-11-02 23:04:22 -0500
committerThe Android Automerger2011-11-02 23:04:22 -0500
commit08ffd07a8867e13ea24989409a9e8aed9268c548 (patch)
tree90d103d391e296c04ac1e927c3d9b00f0a4a858e
parent86eeea5ce88cd551918810e007e33f434bec28f6 (diff)
downloadplatform-system-core-08ffd07a8867e13ea24989409a9e8aed9268c548.tar.gz
platform-system-core-08ffd07a8867e13ea24989409a9e8aed9268c548.tar.xz
platform-system-core-08ffd07a8867e13ea24989409a9e8aed9268c548.zip
Revert "Merge "charger: make the almost-full frame only show when it's current level" into ics-mr0"
This reverts commit 6fb3df8d468a105b49c1cdbbdcb061dc8de022a4, reversing changes made to d4f29767c8cd5a0d8b52b77bed117ca3746af8f3.
-rw-r--r--charger/charger.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/charger/charger.c b/charger/charger.c
index abf551710..03280bfe8 100644
--- a/charger/charger.c
+++ b/charger/charger.c
@@ -87,7 +87,6 @@ struct frame {
87 const char *name; 87 const char *name;
88 int disp_time; 88 int disp_time;
89 int min_capacity; 89 int min_capacity;
90 bool level_only;
91 90
92 gr_surface surface; 91 gr_surface surface;
93}; 92};
@@ -158,7 +157,6 @@ static struct frame batt_anim_frames[] = {
158 .name = "charger/battery_4", 157 .name = "charger/battery_4",
159 .disp_time = 750, 158 .disp_time = 750,
160 .min_capacity = 80, 159 .min_capacity = 80,
161 .level_only = true,
162 }, 160 },
163 { 161 {
164 .name = "charger/battery_5", 162 .name = "charger/battery_5",
@@ -737,14 +735,7 @@ static void update_screen_state(struct charger *charger, int64_t now)
737 * if necessary, advance cycle cntr, and reset frame cntr 735 * if necessary, advance cycle cntr, and reset frame cntr
738 */ 736 */
739 batt_anim->cur_frame++; 737 batt_anim->cur_frame++;
740 738 if (batt_anim->cur_frame == batt_anim->num_frames) {
741 /* if the frame is used for level-only, that is only show it when it's
742 * the current level, skip it during the animation.
743 */
744 while (batt_anim->cur_frame < batt_anim->num_frames &&
745 batt_anim->frames[batt_anim->cur_frame].level_only)
746 batt_anim->cur_frame++;
747 if (batt_anim->cur_frame >= batt_anim->num_frames) {
748 batt_anim->cur_cycle++; 739 batt_anim->cur_cycle++;
749 batt_anim->cur_frame = 0; 740 batt_anim->cur_frame = 0;
750 741