Merge 42c94791 from open-source master
Change-Id: Id17a1a787b6d46c44ba39d628129a3a27f6d70be
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
index 9fe1fb8..6650a71 100644
--- a/cmds/bootanimation/BootAnimation.cpp
+++ b/cmds/bootanimation/BootAnimation.cpp
@@ -248,13 +248,11 @@
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;
- }
- }
+ 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;
}