summaryrefslogtreecommitdiffstats
path: root/healthd
diff options
context:
space:
mode:
authorThierry Strudel <tstrudel@google.com>2018-05-24 17:49:21 -0700
committerandroid-build-merger <android-build-merger@google.com>2018-05-24 17:49:21 -0700
commit60c3c1f3054cfb0666d4fec9743d074950fc5cdf (patch)
tree84fd4a17a9f672542c2f589b213e3ffa9a159ccb /healthd
parent378d0b1e87a3ab277987a1d880b80c87410bc729 (diff)
parent39edb87aaf21f9bd452f3f164ee90cf7a9e14518 (diff)
downloadsystem_core-60c3c1f3054cfb0666d4fec9743d074950fc5cdf.tar.gz
system_core-60c3c1f3054cfb0666d4fec9743d074950fc5cdf.tar.bz2
system_core-60c3c1f3054cfb0666d4fec9743d074950fc5cdf.zip
Merge "healthd_mode_charger: unblank the screen only on first frame" into pi-dev
am: 39edb87aaf Change-Id: Ieb39b688d44ebae9c171e6c530f3f605ab26e20a
Diffstat (limited to 'healthd')
-rw-r--r--healthd/healthd_mode_charger.cpp8
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) {
disp_time = batt_anim->frames[batt_anim->cur_frame].disp_time;
+ /* unblank the screen on first cycle and first frame */
+ if (batt_anim->cur_cycle == 0 && batt_anim->cur_frame == 0) healthd_draw->blank_screen(false);
+
/* animation starting, set up the animation */
if (batt_anim->cur_frame == 0) {
LOGV("[%" PRId64 "] animation starting\n", now);
@@ -331,9 +334,6 @@ static void update_screen_state(charger* charger, int64_t now) {
}
}
- /* unblank the screen on first cycle */
- if (batt_anim->cur_cycle == 0) healthd_draw->blank_screen(false);
-
/* draw the new frame (@ cur_frame) */
healthd_draw->redraw_screen(charger->batt_anim, charger->surf_unknown);
@@ -635,7 +635,7 @@ void healthd_mode_charger_init(struct healthd_config* config) {
ret = res_create_display_surface(anim->fail_file.c_str(), &charger->surf_unknown);
if (ret < 0) {
- LOGE("Cannot load custom battery_fail image. Reverting to built in.\n");
+ LOGE("Cannot load custom battery_fail image. Reverting to built in: %d\n", ret);
ret = res_create_display_surface("charger/battery_fail", &charger->surf_unknown);
if (ret < 0) {
LOGE("Cannot load built in battery_fail image\n");