diff options
Diffstat (limited to 'cmds/bootanimation/BootAnimation.cpp')
-rw-r--r-- | cmds/bootanimation/BootAnimation.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp index 7a7f8ed..6650a71 100644 --- a/cmds/bootanimation/BootAnimation.cpp +++ b/cmds/bootanimation/BootAnimation.cpp @@ -49,6 +49,9 @@ #include "BootAnimation.h" +#define USER_BOOTANIMATION_FILE "/data/local/bootanimation.zip" +#define SYSTEM_BOOTANIMATION_FILE "/system/media/bootanimation.zip" + namespace android { // --------------------------------------------------------------------------- @@ -244,14 +247,12 @@ status_t BootAnimation::readyToRun() { mFlingerSurfaceControl = control; mFlingerSurface = s; - mAndroidAnimation = false; - status_t err = mZip.open("/data/local/bootanimation.zip"); - if (err != NO_ERROR) { - err = mZip.open("/system/media/bootanimation.zip"); - if (err != NO_ERROR) { - mAndroidAnimation = true; - } - } + mAndroidAnimation = true; + if ((access(USER_BOOTANIMATION_FILE, R_OK) == 0) && + (mZip.open(USER_BOOTANIMATION_FILE) == NO_ERROR) || + (access(SYSTEM_BOOTANIMATION_FILE, R_OK) == 0) && + (mZip.open(SYSTEM_BOOTANIMATION_FILE) == NO_ERROR)) + mAndroidAnimation = false; return NO_ERROR; } |