Backed out changeset a43cb4e54949 Trying this a different way.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
diff --git a/src/core/android/SDL_android.c b/src/core/android/SDL_android.c
index 478fdcc..f8c02ea 100644
--- a/src/core/android/SDL_android.c
+++ b/src/core/android/SDL_android.c
@@ -2284,11 +2284,6 @@ void *SDL_AndroidGetActivity(void)
return (*env)->CallStaticObjectMethod(env, mActivityClass, midGetContext);
}
-jclass Android_GetActivityClass(void)
-{
- return mActivityClass;
-}
-
int SDL_GetAndroidSDKVersion(void)
{
static int sdk_version;
diff --git a/src/core/android/SDL_android.h b/src/core/android/SDL_android.h
index 4398060..1531051 100644
--- a/src/core/android/SDL_android.h
+++ b/src/core/android/SDL_android.h
@@ -140,8 +140,6 @@ void Android_ActivityMutex_Lock(void);
void Android_ActivityMutex_Unlock(void);
void Android_ActivityMutex_Lock_Running(void);
-jclass Android_GetActivityClass(void);
-
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
/* *INDENT-OFF* */
diff --git a/src/misc/SDL_url.c b/src/misc/SDL_url.c
index fedbae3..13f914f 100644
--- a/src/misc/SDL_url.c
+++ b/src/misc/SDL_url.c
@@ -18,6 +18,7 @@
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
+
#include "../SDL_internal.h"
#include "SDL_misc.h"
#include "SDL_error.h"
diff --git a/src/misc/android/SDL_sysurl.c b/src/misc/android/SDL_sysurl.c
index 093a0ec..6ee5f8b 100644
--- a/src/misc/android/SDL_sysurl.c
+++ b/src/misc/android/SDL_sysurl.c
@@ -25,7 +25,6 @@
int
SDL_SYS_OpenURL(const char *url)
{
- jclass mActivityClass = Android_GetActivityClass();
JNIEnv *env = Android_JNI_GetEnv();
jstring jurl = (*env)->NewStringUTF(env, url);
const int ret = (*env)->CallStaticIntMethod(env, mActivityClass, midOpenURL, jurl);