mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 06:34:35 +00:00
Android: fix 'JVM object referenced by 'context' is of type 'Context' and it d… (#14016)
fix 'JVM object referenced by 'context' is of type 'Context' and it does not have access to method 'registerReceiver(BroadcastReceiver, IntentFilter)' declared in class 'ContextWrapper'.'
This commit is contained in:
parent
d86e0db683
commit
8abbb98222
3 changed files with 6 additions and 6 deletions
|
|
@ -1,8 +1,8 @@
|
|||
package org.libsdl.app;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
|
||||
import java.lang.Class;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
/**
|
||||
|
|
@ -28,12 +28,12 @@ public class SDL {
|
|||
}
|
||||
|
||||
// This function stores the current activity (SDL or not)
|
||||
static public void setContext(Context context) {
|
||||
static public void setContext(Activity context) {
|
||||
SDLAudioManager.setContext(context);
|
||||
mContext = context;
|
||||
}
|
||||
|
||||
static public Context getContext() {
|
||||
static public Activity getContext() {
|
||||
return mContext;
|
||||
}
|
||||
|
||||
|
|
@ -86,5 +86,5 @@ public class SDL {
|
|||
}
|
||||
}
|
||||
|
||||
protected static Context mContext;
|
||||
protected static Activity mContext;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1262,7 +1262,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static Context getContext() {
|
||||
public static Activity getContext() {
|
||||
return SDL.getContext();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue