11package org .renpy .android ;
22
3+ import org .libsdl .app .SDLActivity ;
4+
5+ public class PythonActivity extends SDLActivity {
6+ }
7+
8+ /**
39import android.app.Activity;
410import android.content.Intent;
511import android.content.ActivityNotFoundException;
4955public class PythonActivity extends Activity implements Runnable {
5056 private static String TAG = "Python";
5157
52- // The audio thread for streaming audio...
53- private static AudioThread mAudioThread = null ;
54-
5558 // The SDLSurfaceView we contain.
5659 public static SDLSurfaceView mView = null;
5760 public static PythonActivity mActivity = null;
@@ -150,10 +153,6 @@ protected void onCreate(Bundle savedInstanceState) {
150153 setContentView(mView);
151154 }
152155
153- /**
154- * Show an error using a toast. (Only makes sense from non-UI
155- * threads.)
156- */
157156 public void toastError(final String msg) {
158157
159158 final Activity thisActivity = this;
@@ -183,10 +182,6 @@ public void recursiveDelete(File f) {
183182 }
184183
185184
186- /**
187- * This determines if unpacking one the zip files included in
188- * the .apk is necessary. If it is, the zip file is unpacked.
189- */
190185 public void unpackData(final String resource, File target) {
191186
192187 // The version of data in memory and on disk.
@@ -245,13 +240,13 @@ public void run() {
245240 unpackData("private", getFilesDir());
246241 unpackData("public", externalStorage);
247242
248- System .loadLibrary ("sdl " );
249- System .loadLibrary ("sdl_image " );
250- System .loadLibrary ("sdl_ttf " );
251- System .loadLibrary ("sdl_mixer " );
243+ System.loadLibrary("SDL2 ");
244+ System.loadLibrary("SDL2_image ");
245+ System.loadLibrary("SDL2_ttf ");
246+ System.loadLibrary("SDL2_mixer ");
252247 System.loadLibrary("python2.7");
253248 System.loadLibrary("application");
254- System .loadLibrary ("sdl_main" );
249+ // System.loadLibrary("sdl_main");
255250
256251 System.load(getFilesDir() + "/lib/python2.7/lib-dynload/_io.so");
257252 System.load(getFilesDir() + "/lib/python2.7/lib-dynload/unicodedata.so");
@@ -269,11 +264,6 @@ public void run() {
269264 } catch(UnsatisfiedLinkError e) {
270265 }
271266
272- if ( mAudioThread == null ) {
273- Log .i ("python" , "Starting audio thread" );
274- mAudioThread = new AudioThread (this );
275- }
276-
277267 runOnUiThread(new Runnable () {
278268 public void run() {
279269 mView.start();
@@ -501,13 +491,6 @@ public void onRestoreTransactionsResponse(RestoreTransactions request,
501491 }
502492 }
503493
504- /**
505- * If the database has not been initialized, we send a
506- * RESTORE_TRANSACTIONS request to Android Market to get the list of purchased items
507- * for this user. This happens if the application has just been installed
508- * or the user wiped data. We do not want to do this on every startup, rather, we want to do
509- * only when the database needs to be initialized.
510- */
511494 private void restoreDatabase() {
512495 SharedPreferences prefs = getPreferences(MODE_PRIVATE);
513496 boolean initialized = prefs.getBoolean(DB_INITIALIZED, false);
@@ -516,8 +499,6 @@ private void restoreDatabase() {
516499 }
517500 }
518501
519- /** An array of product list entries for the products that can be purchased. */
520-
521502 private enum Managed { MANAGED, UNMANAGED, SUBSCRIPTION }
522503
523504
@@ -622,4 +603,4 @@ static String billingGetPendingMessage() {
622603 }
623604
624605}
625-
606+ **/
0 commit comments