Skip to content

Commit 2978751

Browse files
committed
Fix the animation disappeared issue
The animation movie disappears due to the incorrect logic of commit c11f462. Change-Id: I9c0eac2bf2950fe20e931da367036ddf38d81f52
1 parent 9df48a0 commit 2978751

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

cmds/bootanimation/BootAnimation.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -248,13 +248,11 @@ status_t BootAnimation::readyToRun() {
248248
mFlingerSurface = s;
249249

250250
mAndroidAnimation = true;
251-
if ((access(USER_BOOTANIMATION_FILE, R_OK) == 0) ||
252-
(access(SYSTEM_BOOTANIMATION_FILE, R_OK) == 0)) {
253-
if ((mZip.open(USER_BOOTANIMATION_FILE) != NO_ERROR) ||
254-
(mZip.open(SYSTEM_BOOTANIMATION_FILE) != NO_ERROR)) {
255-
mAndroidAnimation = false;
256-
}
257-
}
251+
if ((access(USER_BOOTANIMATION_FILE, R_OK) == 0) &&
252+
(mZip.open(USER_BOOTANIMATION_FILE) == NO_ERROR) ||
253+
(access(SYSTEM_BOOTANIMATION_FILE, R_OK) == 0) &&
254+
(mZip.open(SYSTEM_BOOTANIMATION_FILE) == NO_ERROR))
255+
mAndroidAnimation = false;
258256

259257
return NO_ERROR;
260258
}

0 commit comments

Comments
 (0)