From 6a2eda86129e9c3e9c30fe762d2b572154e8a243 Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Mon, 19 Oct 2015 15:43:03 -0700 Subject: [PATCH] Update Android Java template --- .../src/org/libsdl/app/SDLActivity.java | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/templates/android/template/src/org/libsdl/app/SDLActivity.java b/templates/android/template/src/org/libsdl/app/SDLActivity.java index 9707120b9..72ceca790 100644 --- a/templates/android/template/src/org/libsdl/app/SDLActivity.java +++ b/templates/android/template/src/org/libsdl/app/SDLActivity.java @@ -674,7 +674,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; @@ -682,17 +682,26 @@ public class SDLActivity extends Activity { /** com.android.vending.expansion.zipfile.ZipResourceFile's getInputStream() or null. */ private Method expansionFileMethod; + /** + * 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 openAPKExtensionInputStream(String fileName) throws IOException { + 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) @@ -1142,11 +1151,6 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, } } - // unused - @Override - public void onDraw(Canvas canvas) {} - - // Key events @Override public boolean onKey(View v, int keyCode, KeyEvent event) { @@ -1647,4 +1651,4 @@ class SDLGenericMotionListener_API12 implements View.OnGenericMotionListener { // Event was not managed return false; } -} +} \ No newline at end of file