删除充电动画逻辑,直接设置显示图片logo:hvga_low_battery.bmp
vendor/mediatek/proprietary/external/libshowlogo/charging_animation.cpp
void show_battery_capacity(unsigned int capacity)
{
anim_show_logo(LOW_BATTERY_INDEX);//*/rm animation add set low battery logo
/* if (MTK_LOG_ENABLE == 1) {
SLOGD("[libshowlogo: %s %d]capacity =%d\n",FUNCTION,LINE, capacity);
}
int has_fast_charging = getValue("ro.vendor.mtk_pump_express_plus_support" , "0" );
if (draw_anim_mode == (DRAW_ANIM_MODE_FB)) {
anim_fb_addr_switch();
if( has_fast_charging == 1) {
if (2 != show_animationm_ver && get_fast_charging_state()) {
fill_animation_battery_by_ver(capacity, (void *)outBuffer.bits, dec_logo_addr, logo_addr, phical_screen, show_animationm_ver);
} else {
fill_animation_battery_by_ver(capacity, (void *)fb_addr, dec_logo_addr, logo_addr, phical_screen, show_animationm_ver);
}
}
else {
fill_animation_battery_by_ver(capacity, (void *)fb_addr, dec_logo_addr, logo_addr, phical_screen, show_animationm_ver);
}
anim_fb_disp_update();
} else {
ARect tmpRect;
tmpRect.left = 0;
tmpRect.top = 0;
tmpRect.right = phical_screen.width;
tmpRect.bottom = phical_screen.height;status_t lockResult = surface->lock(&outBuffer, &tmpRect);
if (MTK_LOG_ENABLE == 1) {
SLOGD("[libshowlogo: %s %d]outBuffer.bits = %d, surface->lock return = 0x%08x,\n",FUNCTION,LINE, (int)outBuffer.bits,lockResult);
}
if (0 == lockResult)
{
if(has_fast_charging == 1) {
if (2 != show_animationm_ver && get_fast_charging_state()) {
fill_animation_battery_by_ver(capacity, (void *)outBuffer.bits, dec_logo_addr, logo_addr, phical_screen, show_animationm_ver);
} else {
fill_animation_battery_by_ver(capacity, (void *)outBuffer.bits, dec_logo_addr, logo_addr, phical_screen, show_animationm_ver);
}
} else {
fill_animation_battery_by_ver(capacity, (void *)outBuffer.bits, dec_logo_addr, logo_addr, phical_screen, show_animationm_ver);
}
surface->unlockAndPost();
}
}*/
}
Android 取消充电动画logo,直接显示图片即可
顾北川_野2024-10-23 18:55
相关推荐
向阳2565 分钟前
SpringBoot+vue前后端分离整合sa-token(无cookie登录态 & 详细的登录流程)行墨8 分钟前
Kotlin 主构造函数前行的小黑炭11 分钟前
Android从传统的XML转到Compose的变化:mutableStateOf、MutableStateFlow;有的使用by有的使用by remember_一条咸鱼_14 分钟前
Android Compose 框架尺寸与密度深入剖析(五十五)XiaoLeisj21 分钟前
【MyBatis】深入解析 MyBatis XML 开发:增删改查操作和方法命名规范、@Param 重命名参数、XML 返回自增主键方法风象南22 分钟前
SpringBoot实现数据库读写分离的3种方案在狂风暴雨中奔跑27 分钟前
使用AI开发Android界面振鹏Dong29 分钟前
策略模式——本质是通过Context类来作为中心控制单元,对不同的策略进行调度分配。行墨29 分钟前
Kotlin 定义类与field关键ChinaRainbowSea38 分钟前
3. RabbitMQ 的(Hello World) 和 RabbitMQ 的(Work Queues)工作队列