File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change 4949
5050#include " BootAnimation.h"
5151
52+ #define USER_BOOTANIMATION_FILE " /data/local/bootanimation.zip"
53+ #define SYSTEM_BOOTANIMATION_FILE " /system/media/bootanimation.zip"
54+
5255namespace android {
5356
5457// ---------------------------------------------------------------------------
@@ -244,12 +247,12 @@ status_t BootAnimation::readyToRun() {
244247 mFlingerSurfaceControl = control;
245248 mFlingerSurface = s;
246249
247- mAndroidAnimation = false ;
248- status_t err = mZip . open ( " /data/local/bootanimation.zip " );
249- if (err != NO_ERROR ) {
250- err = mZip .open (" /system/media/bootanimation.zip " );
251- if (err != NO_ERROR) {
252- mAndroidAnimation = true ;
250+ 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 ;
253256 }
254257 }
255258
You can’t perform that action at this time.
0 commit comments