Android P 修改关机充电图标横屏显示

1.把vendor/mediatek/proprietary/bootable/bootloader/lk/dev/logo/wuxga/中充电的图片旋转合适的方向;
比如wuxga_bat_100.bmp(1200*1920)修改前:
在这里插入图片描述
旋转修改后的
在这里插入图片描述
按照如上方法分别修改如下文件图片
在这里插入图片描述
2.修改vendor/mediatek/proprietary/external/libshowlogo/charging_animation.cpp

@@ -711,7 +711,7 @@ int anim_fb_init(void)
     } else if(0 == strncmp(MTK_LCM_PHYSICAL_ROTATION, "180", 3) && (phical_screen.need180Adjust == 1)){
         phical_screen.rotation = 180;
     } else {
-        phical_screen.rotation = 0;
+        phical_screen.rotation = 270;//根据设备旋转合适的方向
     }
     if (MTK_LOG_ENABLE == 1) {
         SLOGD("[libshowlogo]phical_screen: width= %d,height= %d,bits_per_pixel =%d,needAllign = %d,allignWidth=%d rotation =%d ,need180Adjust = %d\n",

PS这样修改后,wuxga_bat_bg.bmp和wuxga_kernel.bmp会被旋转,所以需要对这两张图片进行旋转。
比如wuxga_bat_bg.bmp(1920*1200)旋转后的效果图如下:
在这里插入图片描述
3.vendor/mediatek/proprietary/external/libshowlogo/cust_display.h

@@ -687,31 +687,31 @@
        // wuxga 1200*1920
 
        // battery capacity rectangle
-       #define CAPACITY_LEFT                (447) // battery capacity center
-       #define CAPACITY_TOP                 (803)
-       #define CAPACITY_RIGHT               (751)
-       #define CAPACITY_BOTTOM              (1289)
-
-       #define NUMBER_LEFT                  (494) // number
-       #define NUMBER_TOP                   (481)
-       #define NUMBER_RIGHT                 (578)//494+84
-       #define NUMBER_BOTTOM                (602) //481+121
-
-       #define PERCENT_LEFT                 (662) // percent number_left + 2*number_width
-       #define PERCENT_TOP                  (481)
-       #define PERCENT_RIGHT                (770) //662+108
-       #define PERCENT_BOTTOM               (602) //481+121
-
-       #define TOP_ANIMATION_LEFT           (447) // top animation
+       #define CAPACITY_LEFT                (806) // battery capacity center
+       #define CAPACITY_TOP                 (443)
+       #define CAPACITY_RIGHT               (1110)
+       #define CAPACITY_BOTTOM              (929)
+
+       #define NUMBER_LEFT                  (855) // number
+       #define NUMBER_TOP                   (124)
+       #define NUMBER_RIGHT                 (939) //855+84
+       #define NUMBER_BOTTOM                (245)
+
+       #define PERCENT_LEFT                 (1023) // percent number_left + 2*number_width
+       #define PERCENT_TOP                  (124)
+       #define PERCENT_RIGHT                (1131) //1023+108
+       #define PERCENT_BOTTOM               (245)  //124+121
+
+       #define TOP_ANIMATION_LEFT           (806) // top animation
        #define TOP_ANIMATION_TOP            (100)
-       #define TOP_ANIMATION_RIGHT          (751)
+       #define TOP_ANIMATION_RIGHT          (1110) //806+304
        #define TOP_ANIMATION_BOTTOM         (152)
 
        // for old animation
-       #define BAR_LEFT            (529)
+       #define BAR_LEFT            (890)
        #define BAR_TOP             (357)
-       #define BAR_RIGHT           (672)
-       #define BAR_BOTTOM          (680)
+       #define BAR_RIGHT           (1030)
+       #define BAR_BOTTOM          (678)
        
 #elif defined(XGA)
        // xga 768*1024

实际上是把 // wuxga 12001920的配置数据替换为 // wuxga 19201200的数据。

发布了86 篇原创文章 · 获赞 10 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/jydzm/article/details/89501149