高通SC60(msm8953)测试通过,用户可自定义开机动画,系统打包多个开机动画包
步骤一:手动设置系统属性:persist.custom.animation(属性值为开机动画路径)
步骤二:frameworks/base/cmds/bootanimation/BootAnimation.cpp
status_t BootAnimation::readyToRun()方法
property_get("persist.custom.animation", customAnimation, "null");
/* hide by wangw
char decrypt[PROPERTY_VALUE_MAX];
property_get("vold.decrypt", decrypt, "");
bool encryptedAnimation = atoi(decrypt) != 0 || !strcmp("trigger_restart_min_framework", decrypt);
if (encryptedAnimation && (access(getAnimationFileName(IMG_ENC), R_OK) == 0)) {
mZipFileName = getAnimationFileName(IMG_ENC);
}
else if (access(getAnimationFileName(IMG_OEM), R_OK) == 0) {
mZipFileName = getAnimationFileName(IMG_OEM);
}
else if (access(getAnimationFileName(IMG_SYS), R_OK) == 0) {
mZipFileName = getAnimationFileName(IMG_SYS);
}*/
//add wangw
char customAnimation[PROPERTY_VALUE_MAX];
property_get("persist.custom.animation", customAnimation, "null");
ALOGE("%s:%d customAnimation: %s\n",__func__,__LINE__,customAnimation);
if(strncmp(customAnimation, "null", 4) != 0 && access(customAnimation, R_OK) == 0){
mZipFileName = customAnimation;
}else if (access(getAnimationFileName(IMG_SYS), R_OK) == 0) {
mZipFileName = getAnimationFileName(IMG_SYS);
}
ALOGE("%s:%d mZipFileName: %s\n",__func__,__LINE__,mZipFileName.string());