summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Kondik <shade@chemlab.org>2010-08-16 19:55:57 -0400
committerSteve Kondik <shade@chemlab.org>2010-08-16 19:55:57 -0400
commit553d11e2b29437f6fd2930947914a463f61d0f15 (patch)
treeb2a7cbb06ffa5b57e24f16be3d69fc42492e3e2e
parent1247cf845f3a1e15258cdd12c30192e1b011a886 (diff)
downloadframeworks_base-553d11e2b29437f6fd2930947914a463f61d0f15.zip
frameworks_base-553d11e2b29437f6fd2930947914a463f61d0f15.tar.gz
frameworks_base-553d11e2b29437f6fd2930947914a463f61d0f15.tar.bz2
Revert "bootanimation: Don't open non-existing bootanimation.zip"
This reverts commit 67dbf762bc8cd2c89403f2b476037426d1c651a1.
-rw-r--r--cmds/bootanimation/BootAnimation.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
index f4b48b6..ac2eb0d 100644
--- a/cmds/bootanimation/BootAnimation.cpp
+++ b/cmds/bootanimation/BootAnimation.cpp
@@ -49,9 +49,6 @@
#include "BootAnimation.h"
-#define USER_BOOTANIMATION_FILE "/data/local/bootanimation.zip"
-#define SYSTEM_BOOTANIMATION_FILE "/system/media/bootanimation.zip"
-
namespace android {
// ---------------------------------------------------------------------------
@@ -247,12 +244,12 @@ status_t BootAnimation::readyToRun() {
mFlingerSurfaceControl = control;
mFlingerSurface = s;
- 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;
+ 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;
}
}