summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Bargiacchi2016-08-18 19:33:32 -0500
committerTao Bao2016-11-15 16:25:44 -0600
commit329c60458b1461c31696652b8171460c4ffbc381 (patch)
tree7dcd65cb6809beef17470dfe20d3434aa599bdd7
parent787482ecd9658b3078044aa287680b32795c2375 (diff)
downloadplatform-system-core-329c60458b1461c31696652b8171460c4ffbc381.tar.gz
platform-system-core-329c60458b1461c31696652b8171460c4ffbc381.tar.xz
platform-system-core-329c60458b1461c31696652b8171460c4ffbc381.zip
Update to new minui text API
Change-Id: Ic753564a397b90a9ba54660c78bec9c1a1ef583d (cherry picked from commit 0ee524de689e27379eaa3d0af0152183b844b0e8)
-rw-r--r--healthd/healthd_mode_charger.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/healthd/healthd_mode_charger.cpp b/healthd/healthd_mode_charger.cpp
index 612885bc7..857bcb28c 100644
--- a/healthd/healthd_mode_charger.cpp
+++ b/healthd/healthd_mode_charger.cpp
@@ -257,13 +257,13 @@ static int request_suspend(bool /*enable*/)
257 257
258static int draw_text(const char *str, int x, int y) 258static int draw_text(const char *str, int x, int y)
259{ 259{
260 int str_len_px = gr_measure(str); 260 int str_len_px = gr_measure(gr_sys_font(), str);
261 261
262 if (x < 0) 262 if (x < 0)
263 x = (gr_fb_width() - str_len_px) / 2; 263 x = (gr_fb_width() - str_len_px) / 2;
264 if (y < 0) 264 if (y < 0)
265 y = (gr_fb_height() - char_height) / 2; 265 y = (gr_fb_height() - char_height) / 2;
266 gr_text(x, y, str, 0); 266 gr_text(gr_sys_font(), x, y, str, 0);
267 267
268 return y + char_height; 268 return y + char_height;
269} 269}
@@ -364,7 +364,7 @@ static void update_screen_state(struct charger *charger, int64_t now)
364 } 364 }
365 365
366 gr_init(); 366 gr_init();
367 gr_font_size(&char_width, &char_height); 367 gr_font_size(gr_sys_font(), &char_width, &char_height);
368 368
369#ifndef CHARGER_DISABLE_INIT_BLANK 369#ifndef CHARGER_DISABLE_INIT_BLANK
370 gr_fb_blank(true); 370 gr_fb_blank(true);