From 6ef6d0d27a119dba5f223afb78759508a55ab94d Mon Sep 17 00:00:00 2001 From: mittorn Date: Mon, 7 Nov 2016 17:36:08 +0000 Subject: [PATCH] Fix java launcher --- .../in/celest/xash3d/LauncherActivity.java | 25 +------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/android/src/in/celest/xash3d/LauncherActivity.java b/android/src/in/celest/xash3d/LauncherActivity.java index 73da73a8..f5832c9e 100644 --- a/android/src/in/celest/xash3d/LauncherActivity.java +++ b/android/src/in/celest/xash3d/LauncherActivity.java @@ -56,7 +56,7 @@ public class LauncherActivity extends Activity { launcher.addView(startButton); setContentView(launcher); mPref = getSharedPreferences("mod", 0); - extractPAK(this, false); + InstallReceiver.extractPAK(this, false); cmdArgs.setText(mPref.getString("argv","-dev 3 -log")); } @@ -77,27 +77,4 @@ public class LauncherActivity extends Activity { intent.putExtra("pakfile", getFilesDir().getAbsolutePath() + "/extras.pak" ); startActivity(intent); } - - public static void extractPAK(Context context, Boolean force) { - if(isExtracting) - return; - isExtracting = true; - try { - if( mPref == null ) - mPref = context.getSharedPreferences("mod", 0); - if( mPref.getInt( "pakversion", 0 ) == PAK_VERSION && !force ) - return; - extractFile(context, "extras.pak"); - - SharedPreferences.Editor editor = mPref.edit(); - editor.putInt( "pakversion", PAK_VERSION ); - editor.commit(); - editor.apply(); - } catch( Exception e ) - { - Log.e( TAG, "Failed to extract PAK:" + e.toString() ); - } - isExtracting = false; - } - }