diff options
author | TreeHugger Robot | 2018-05-24 02:03:36 -0500 |
---|---|---|
committer | Android (Google) Code Review | 2018-05-24 02:03:36 -0500 |
commit | 39edb87aaf21f9bd452f3f164ee90cf7a9e14518 (patch) | |
tree | a070646b74256ed5d949e1bbd9740404f83ba153 | |
parent | c70e76f1a4571dbc767a07e809341a73d3cdb289 (diff) | |
parent | ac2aa7d7b1ec4c292c0f9061fa758c61974d4ca0 (diff) | |
download | platform-system-core-39edb87aaf21f9bd452f3f164ee90cf7a9e14518.tar.gz platform-system-core-39edb87aaf21f9bd452f3f164ee90cf7a9e14518.tar.xz platform-system-core-39edb87aaf21f9bd452f3f164ee90cf7a9e14518.zip |
Merge "healthd_mode_charger: unblank the screen only on first frame" into pi-dev
-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 61e746571..56a9f8691 100644 --- a/healthd/healthd_mode_charger.cpp +++ b/healthd/healthd_mode_charger.cpp | |||
@@ -308,6 +308,9 @@ static void update_screen_state(charger* charger, int64_t now) { | |||
308 | 308 | ||
309 | disp_time = batt_anim->frames[batt_anim->cur_frame].disp_time; | 309 | disp_time = batt_anim->frames[batt_anim->cur_frame].disp_time; |
310 | 310 | ||
311 | /* unblank the screen on first cycle and first frame */ | ||
312 | if (batt_anim->cur_cycle == 0 && batt_anim->cur_frame == 0) healthd_draw->blank_screen(false); | ||
313 | |||
311 | /* animation starting, set up the animation */ | 314 | /* animation starting, set up the animation */ |
312 | if (batt_anim->cur_frame == 0) { | 315 | if (batt_anim->cur_frame == 0) { |
313 | LOGV("[%" PRId64 "] animation starting\n", now); | 316 | LOGV("[%" PRId64 "] animation starting\n", now); |
@@ -331,9 +334,6 @@ static void update_screen_state(charger* charger, int64_t now) { | |||
331 | } | 334 | } |
332 | } | 335 | } |
333 | 336 | ||
334 | /* unblank the screen on first cycle */ | ||
335 | if (batt_anim->cur_cycle == 0) healthd_draw->blank_screen(false); | ||
336 | |||
337 | /* draw the new frame (@ cur_frame) */ | 337 | /* draw the new frame (@ cur_frame) */ |
338 | healthd_draw->redraw_screen(charger->batt_anim, charger->surf_unknown); | 338 | healthd_draw->redraw_screen(charger->batt_anim, charger->surf_unknown); |
339 | 339 | ||
@@ -635,7 +635,7 @@ void healthd_mode_charger_init(struct healthd_config* config) { | |||
635 | 635 | ||
636 | ret = res_create_display_surface(anim->fail_file.c_str(), &charger->surf_unknown); | 636 | ret = res_create_display_surface(anim->fail_file.c_str(), &charger->surf_unknown); |
637 | if (ret < 0) { | 637 | if (ret < 0) { |
638 | LOGE("Cannot load custom battery_fail image. Reverting to built in.\n"); | 638 | LOGE("Cannot load custom battery_fail image. Reverting to built in: %d\n", ret); |
639 | ret = res_create_display_surface("charger/battery_fail", &charger->surf_unknown); | 639 | ret = res_create_display_surface("charger/battery_fail", &charger->surf_unknown); |
640 | if (ret < 0) { | 640 | if (ret < 0) { |
641 | LOGE("Cannot load built in battery_fail image\n"); | 641 | LOGE("Cannot load built in battery_fail image\n"); |