通常我们安卓的开机动画都是动画切图做成按逐帧播放出来的,有客户突然给了mp4的说其他家可以就搞了下,很简单,补丁如下:
```java
Index: frameworks/base/cmds/bootanimation/BootAnimation.cpp
===================================================================
--- frameworks/base/cmds/bootanimation/BootAnimation.cpp (revision 1019)
+++ frameworks/base/cmds/bootanimation/BootAnimation.cpp (working copy)
@@ -92,7 +92,7 @@
//support boot video
static const char DATA_BOOTVIDEO_FILE[] = "/data/local/bootanimation.ts";
-static const char SYSTEM_BOOTVIDEO_FILE[] = "/product/media/bootanimation.ts";
+static const char SYSTEM_BOOTVIDEO_FILE[] = "/odm/media/bootanimation.mp4";
static const char SYSTEM_DATA_DIR_PATH[] = "/data/system";
static const char SYSTEM_TIME_DIR_NAME[] = "time";
@@ -550,7 +550,7 @@
char value[PROPERTY_VALUE_MAX];
property_get("persist.sys.bootvideo.showtime", value, "-1");
ALOGD("findBootAnimationFile()-->bootvideo.enable=%s, showtime=%s", decrypt, value);
- if(mVideoFile != NULL && !strcmp(decrypt, "true") &&(atoi(value)!=0)) {
+ if(mVideoFile != NULL ) {
mVideoAnimation = true;
ALOGD("mVideoAnimation = true");
}else{
在编译过程中把动画放在/odm/media/bootanimation.mp4这里就行了