Android系統關機充電動畫實現
阿新 • • 發佈:2019-01-23
<span style="font-size:18px;color:#FF0000;">\mediatek\platform\mt6572\lk\mt_logo.c </span> /********** show_animationm_ver: charging animation version ************/ /* */ /* version 0: show 4 recatangle growing animation without battery number */ /* version 1: show wave animation with battery number */ /* */ /*** ***/ /* * Get the defined charging animation version * */ void sync_anim_version() { dprintf(INFO, "[lk logo: %s %d]\n",__FUNCTION__,__LINE__); #ifdef ANIMATION_NEW show_animationm_ver = 1 ; #else show_animationm_ver = 0 ; dprintf(INFO, "[lk logo %s %d]not define ANIMATION_NEW:show old animation \n",__FUNCTION__,__LINE__); #endif } int show_animationm_ver = 0; <span style="font-size:18px;color:#FF0000;">\mediatek\external\ipod\bootlogo.cpp </span> /* * Read charging animation feature option, and set charging animation version * * version 0: show 4 recatangle growing animation without battery number * version 1: show wave animation with battery number */ void sync_anim_version() { XLOGD("[ChargingAnimation: %s %d]\n",__FUNCTION__,__LINE__); if (is_wireless_charging()) { set_anim_version(WIRELESS_CHARGING_ANIM_VER); } else { #ifdef ANIMATION_NEW set_anim_version(1); #else set_anim_version(0); XLOGD("[ChargingAnimation %s %d]not define ANIMATION_NEW:show old animation \n",__FUNCTION__,__LINE__); #endif } <span style="color:#FF0000;"> </span><span style="font-size:18px;"><span style="color:#FF0000;">mediatek\external\libshowlogo\show_animation_common.c\ show_animation_common.c fill_animation_battery_ver_1//執行充電動畫的函式</span></span> /* * Show charging animation by version * */ void fill_animation_battery_by_ver(unsigned int capacity,void *fill_addr, void * dec_logo_addr, void * logo_addr, LCM_SCREEN_T phical_screen, int version) { LOG_ANIM("[show_animation_common: %s %d]version : %d\n",__FUNCTION__,__LINE__, version); switch (version) { case 0: fill_animation_battery_ver_0(capacity, fill_addr, dec_logo_addr, logo_addr, phical_screen); break; case 1: fill_animation_battery_ver_1(capacity, fill_addr, dec_logo_addr, logo_addr, phical_screen); break;