File tree 2 files changed +6
-5
lines changed
pythonforandroid/bootstraps/sdl2/build/src/main/java/org/kivy/android
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ public void onTaskRemoved(Intent rootIntent) {
143
143
144
144
@ Override
145
145
public void run (){
146
- PythonUtil .loadLibraries (PythonActivity . mActivity );
146
+ PythonUtil .loadLibraries (this );
147
147
this .mService = this ;
148
148
nativeStart (
149
149
androidPrivate , androidArgument ,
Original file line number Diff line number Diff line change 4
4
5
5
import android .util .Log ;
6
6
import android .app .Activity ;
7
+ import android .content .Context ;
7
8
import android .content .res .AssetManager ;
8
9
9
10
import java .util .ArrayList ;
15
16
public class PythonUtil {
16
17
private static final String TAG = "pythonutil" ;
17
18
18
- protected static ArrayList <String > getLibraries (Activity activity ) {
19
- AssetManager assets = activity .getAssets ();
19
+ protected static ArrayList <String > getLibraries (Context context ) {
20
+ AssetManager assets = context .getAssets ();
20
21
21
22
StringBuilder sb = new StringBuilder ();
22
23
ArrayList <String > libsList = new ArrayList <String >();
@@ -43,11 +44,11 @@ protected static ArrayList<String> getLibraries(Activity activity) {
43
44
return libsList ;
44
45
}
45
46
46
- public static void loadLibraries (Activity activity ) {
47
+ public static void loadLibraries (Context context ) {
47
48
48
49
boolean foundPython = false ;
49
50
50
- for (String lib : getLibraries (activity )) {
51
+ for (String lib : getLibraries (context )) {
51
52
Log .v (TAG , "Loading library: " + lib );
52
53
try {
53
54
System .loadLibrary (lib );
You can’t perform that action at this time.
0 commit comments