|
@@ -669,7 +669,7 @@ public class SDLActivity extends Activity {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // APK extension files support
|
|
|
+ // APK expansion files support
|
|
|
|
|
|
/** com.android.vending.expansion.zipfile.ZipResourceFile object or null. */
|
|
|
private Object expansionFile;
|
|
@@ -678,16 +678,25 @@ public class SDLActivity extends Activity {
|
|
|
private Method expansionFileMethod;
|
|
|
|
|
|
/**
|
|
|
- * This method is called by SDL using JNI.
|
|
|
+ * This method was called by SDL using JNI.
|
|
|
+ * @deprecated because of an incorrect name
|
|
|
*/
|
|
|
+ @Deprecated
|
|
|
public InputStream openAPKExtensionInputStream(String fileName) throws IOException {
|
|
|
+ return openAPKExpansionInputStream(fileName);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * This method is called by SDL using JNI.
|
|
|
+ */
|
|
|
+ public InputStream openAPKExpansionInputStream(String fileName) throws IOException {
|
|
|
// Get a ZipResourceFile representing a merger of both the main and patch files
|
|
|
if (expansionFile == null) {
|
|
|
Integer mainVersion = Integer.valueOf(nativeGetHint("SDL_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION"));
|
|
|
Integer patchVersion = Integer.valueOf(nativeGetHint("SDL_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION"));
|
|
|
|
|
|
try {
|
|
|
- // To avoid direct dependency on Google APK extension library that is
|
|
|
+ // To avoid direct dependency on Google APK expansion library that is
|
|
|
// not a part of Android SDK we access it using reflection
|
|
|
expansionFile = Class.forName("com.android.vending.expansion.zipfile.APKExpansionSupport")
|
|
|
.getMethod("getAPKExpansionZipFile", Context.class, int.class, int.class)
|