summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2010-08-17 07:51:40 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-08-17 07:51:40 -0700
commitc4a4f26778d4d637aa32bee0e75566f586891a00 (patch)
tree673584a2cfbec03eda670fe3fa11e9bb30c10f49 /cmds
parenta542f8cd0eac0027df12ef0ec18e7c8d5d81bdf2 (diff)
parent18dd95f451f866804d19797bc47ab5a2821c0020 (diff)
downloadframeworks_base-c4a4f26778d4d637aa32bee0e75566f586891a00.zip
frameworks_base-c4a4f26778d4d637aa32bee0e75566f586891a00.tar.gz
frameworks_base-c4a4f26778d4d637aa32bee0e75566f586891a00.tar.bz2
am 18dd95f4: am 05b20c03: Merge "bootanimation: Don\'t open non-existing bootanimation.zip"
Merge commit '18dd95f451f866804d19797bc47ab5a2821c0020' * commit '18dd95f451f866804d19797bc47ab5a2821c0020': bootanimation: Don't open non-existing bootanimation.zip
Diffstat (limited to 'cmds')
-rw-r--r--cmds/bootanimation/BootAnimation.cpp15
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;
}
}