diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2010-08-17 07:48:26 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-08-17 07:48:26 -0700 |
commit | 18dd95f451f866804d19797bc47ab5a2821c0020 (patch) | |
tree | 2ab37d6b4e4d31c1b8050e0223f9d0c8c14323ab | |
parent | 1a0b19b324eb6631333dcc51d9b92c3b1ead2eac (diff) | |
parent | 05b20c034d5a1ffe64c15d155dd8511b77b8989b (diff) | |
download | frameworks_base-18dd95f451f866804d19797bc47ab5a2821c0020.zip frameworks_base-18dd95f451f866804d19797bc47ab5a2821c0020.tar.gz frameworks_base-18dd95f451f866804d19797bc47ab5a2821c0020.tar.bz2 |
am 05b20c03: Merge "bootanimation: Don\'t open non-existing bootanimation.zip"
Merge commit '05b20c034d5a1ffe64c15d155dd8511b77b8989b' into gingerbread-plus-aosp
* commit '05b20c034d5a1ffe64c15d155dd8511b77b8989b':
bootanimation: Don't open non-existing bootanimation.zip
-rw-r--r-- | cmds/bootanimation/BootAnimation.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp index 7a7f8ed..9fe1fb8 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,12 +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) || + (access(SYSTEM_BOOTANIMATION_FILE, R_OK) == 0)) { + if ((mZip.open(USER_BOOTANIMATION_FILE) != NO_ERROR) || + (mZip.open(SYSTEM_BOOTANIMATION_FILE) != NO_ERROR)) { + mAndroidAnimation = false; } } |