[RK3288]修改开机视屏播放,解决Android音量无法调节问题

[RK3288]修改开机视屏播放,解决Android音量无法调节问题

源码修改

diff --git a/device/rockchip/common/bootvideo/bootvideo.mk b/device/rockchip/common/bootvideo/bootvideo.mk
index 9b9c8d3..afac264 100755
--- a/device/rockchip/common/bootvideo/bootvideo.mk
+++ b/device/rockchip/common/bootvideo/bootvideo.mk
@@ -1,11 +1,11 @@
 CUR_PATH := device/rockchip/common/bootvideo
 
-HAVE_BOOT_VIDEO := $(shell test -f $(CUR_PATH)/bootanimation.ts && echo yes)
+HAVE_BOOT_VIDEO := $(shell test -f $(CUR_PATH)/bootanimation.mp4 && echo yes)
 
 ifeq ($(HAVE_BOOT_VIDEO), yes)
-PRODUCT_COPY_FILES += $(CUR_PATH)/bootanimation.ts:system/media/bootanimation.ts
+PRODUCT_COPY_FILES += $(CUR_PATH)/bootanimation.mp4:system/media/bootanimation.mp4
 endif
 
 PRODUCT_PROPERTY_OVERRIDES += \
-        persist.sys.bootvideo.enable=true \
+       ## persist.sys.bootvideo.enable=true//注释这个覆盖属性的函数 
         persist.sys.bootvideo.showtime=-2 

然后修改

diff --git a/frameworks/base/cmds/bootanimation/BootAnimation.cpp b/frameworks/base/cmds/bootanimation/BootAnimation.cpp
index 24c8fa4..18220e7 100755
--- a/frameworks/base/cmds/bootanimation/BootAnimation.cpp
+++ b/frameworks/base/cmds/bootanimation/BootAnimation.cpp
@@ -70,7 +70,7 @@ static const char SYSTEM_SHUTDOWNANIMATION_FILE[] = "/system/media/shutdownanima
 static const char SYSTEM_ENCRYPTED_BOOTANIMATION_FILE[] = "/system/media/bootanimation-encrypted.zip";
 //support boot video
 static const char DATA_BOOTVIDEO_FILE[] = "/data/local/bootanimation.ts";
-static const char SYSTEM_BOOTVIDEO_FILE[] = "/system/media/bootanimation.ts";
+static const char SYSTEM_BOOTVIDEO_FILE[] = "/system/media/bootanimation.mp4";
 static const char SYSTEM_DATA_DIR_PATH[] = "/data/system";
 static const char SYSTEM_TIME_DIR_NAME[] = "time";
 static const char SYSTEM_TIME_DIR_PATH[] = "/data/system/time";
@@ -366,7 +366,7 @@ status_t BootAnimation::readyToRun() {
        } else if (access(DATA_BOOTVIDEO_FILE, R_OK) == 0){
        	  mVideoFile = (char*)DATA_BOOTVIDEO_FILE;
        }
-       property_get("persist.sys.bootvideo.enable",decrypt, "false");
+       property_get("persist.sys.bootvideo.enable",decrypt, "true");//这个地方修改默认值为true
        char value[PROPERTY_VALUE_MAX];
        property_get("persist.sys.bootvideo.showtime", value, "-1");
        if(mVideoFile != NULL && !strcmp(decrypt, "true") &&(atoi(value)!=0)) {
@@ -482,7 +482,7 @@ void BootAnimation::checkExit() {
     property_get(EXIT_PROP_NAME, value, "0");
     int exitnow = atoi(value);
     //add for boot video function         
-     property_get("persist.sys.bootvideo.enable",value, "false");
+     property_get("persist.sys.bootvideo.enable",value, "true");//同上一样修改默认值为true
      const nsecs_t realBootanimaTime = systemTime()-mStartbootanimaTime;
     if (exitnow) {
         //add for boot video function
发布了1 篇原创文章 · 获赞 1 · 访问量 29

猜你喜欢

转载自blog.csdn.net/qq_43350462/article/details/104028567