src/core/android/SDL_android.c
changeset 9870 6dd5ab47534b
parent 9869 4ba43d626c4a
child 9873 b0f121cfa074
equal deleted inserted replaced
9869:4ba43d626c4a 9870:6dd5ab47534b
   788             /* Try fallback to APK expansion files */
   788             /* Try fallback to APK expansion files */
   789             mid = (*mEnv)->GetMethodID(mEnv, (*mEnv)->GetObjectClass(mEnv, context),
   789             mid = (*mEnv)->GetMethodID(mEnv, (*mEnv)->GetObjectClass(mEnv, context),
   790                 "openAPKExpansionInputStream", "(Ljava/lang/String;)Ljava/io/InputStream;");
   790                 "openAPKExpansionInputStream", "(Ljava/lang/String;)Ljava/io/InputStream;");
   791             inputStream = (*mEnv)->CallObjectMethod(mEnv, context, mid, fileNameJString);
   791             inputStream = (*mEnv)->CallObjectMethod(mEnv, context, mid, fileNameJString);
   792 
   792 
   793             if (Android_JNI_ExceptionOccurred(SDL_FALSE)) {
   793             /* Exception is checked first because it always needs to be cleared.
       
   794              * If no exception occurred then the last SDL error message is kept.
       
   795              */
       
   796             if (Android_JNI_ExceptionOccurred(SDL_FALSE) || !inputStream) {
   794                 goto failure;
   797                 goto failure;
   795             }
   798             }
   796         }
   799         }
   797 
   800 
   798         ctx->hidden.androidio.inputStreamRef = (*mEnv)->NewGlobalRef(mEnv, inputStream);
   801         ctx->hidden.androidio.inputStreamRef = (*mEnv)->NewGlobalRef(mEnv, inputStream);