diff options
author | Thierry Strudel | 2018-05-23 17:48:46 -0500 |
---|---|---|
committer | Thierry Strudel | 2018-07-30 02:18:06 -0500 |
commit | 2cbe2c7b29b90e71dcaf3820071a62b31e6faa51 (patch) | |
tree | 313e20cf3308d9fd9d2f7fc6cc643bbf14f21fd3 /healthd | |
parent | 2756339c77154d528ead079edddbbe6babc76325 (diff) | |
download | platform-system-core-2cbe2c7b29b90e71dcaf3820071a62b31e6faa51.tar.gz platform-system-core-2cbe2c7b29b90e71dcaf3820071a62b31e6faa51.tar.xz platform-system-core-2cbe2c7b29b90e71dcaf3820071a62b31e6faa51.zip |
healthd_mode_charger: unblank the screen only on first frame
Original code is unblank screen for all frames of the first
cycle, unblank is needed only before the first frame of the
first cycle.
Bug: 74771887
Change-Id: I51d8390e359335a0b1cb127b096db1a8b889b169
Signed-off-by: Thierry Strudel <tstrudel@google.com>
Diffstat (limited to 'healthd')
-rw-r--r-- | healthd/healthd_mode_charger.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/healthd/healthd_mode_charger.cpp b/healthd/healthd_mode_charger.cpp index 4f77e7a1e..f1fe5cd21 100644 --- a/healthd/healthd_mode_charger.cpp +++ b/healthd/healthd_mode_charger.cpp | |||
@@ -307,6 +307,9 @@ static void update_screen_state(charger* charger, int64_t now) { | |||
307 | 307 | ||
308 | disp_time = batt_anim->frames[batt_anim->cur_frame].disp_time; | 308 | disp_time = batt_anim->frames[batt_anim->cur_frame].disp_time; |
309 | 309 | ||
310 | /* unblank the screen on first cycle and first frame */ | ||
311 | if (batt_anim->cur_cycle == 0 && batt_anim->cur_frame == 0) healthd_draw->blank_screen(false); | ||
312 | |||
310 | /* animation starting, set up the animation */ | 313 | /* animation starting, set up the animation */ |
311 | if (batt_anim->cur_frame == 0) { | 314 | if (batt_anim->cur_frame == 0) { |
312 | LOGV("[%" PRId64 "] animation starting\n", now); | 315 | LOGV("[%" PRId64 "] animation starting\n", now); |
@@ -330,9 +333,6 @@ static void update_screen_state(charger* charger, int64_t now) { | |||
330 | } | 333 | } |
331 | } | 334 | } |
332 | 335 | ||
333 | /* unblank the screen on first cycle */ | ||
334 | if (batt_anim->cur_cycle == 0) healthd_draw->blank_screen(false); | ||
335 | |||
336 | /* draw the new frame (@ cur_frame) */ | 336 | /* draw the new frame (@ cur_frame) */ |
337 | healthd_draw->redraw_screen(charger->batt_anim, charger->surf_unknown); | 337 | healthd_draw->redraw_screen(charger->batt_anim, charger->surf_unknown); |
338 | 338 | ||
@@ -632,7 +632,7 @@ void healthd_mode_charger_init(struct healthd_config* config) { | |||
632 | 632 | ||
633 | ret = res_create_display_surface(anim->fail_file.c_str(), &charger->surf_unknown); | 633 | ret = res_create_display_surface(anim->fail_file.c_str(), &charger->surf_unknown); |
634 | if (ret < 0) { | 634 | if (ret < 0) { |
635 | LOGE("Cannot load custom battery_fail image. Reverting to built in.\n"); | 635 | LOGE("Cannot load custom battery_fail image. Reverting to built in: %d\n", ret); |
636 | ret = res_create_display_surface("charger/battery_fail", &charger->surf_unknown); | 636 | ret = res_create_display_surface("charger/battery_fail", &charger->surf_unknown); |
637 | if (ret < 0) { | 637 | if (ret < 0) { |
638 | LOGE("Cannot load built in battery_fail image\n"); | 638 | LOGE("Cannot load built in battery_fail image\n"); |