--- a/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Downloader/DownloadAssets.java Sun Feb 19 16:51:22 2012 +0100
+++ b/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Downloader/DownloadAssets.java Mon Feb 20 21:22:04 2012 +0100
@@ -9,7 +9,11 @@
import java.io.OutputStream;
import org.hedgewars.hedgeroid.MainActivity;
+import org.hedgewars.hedgeroid.R;
import org.hedgewars.hedgeroid.Utils;
+import org.hedgewars.hedgeroid.Datastructures.Scheme;
+import org.hedgewars.hedgeroid.Datastructures.Team;
+import org.hedgewars.hedgeroid.Datastructures.Weapon;
import android.content.Context;
import android.content.res.AssetManager;
@@ -82,6 +86,9 @@
}
protected Long doInBackground(Object... params) {
+ Utils.resRawToFilesDir(act,R.array.schemes, Scheme.DIRECTORY_SCHEME);
+ Utils.resRawToFilesDir(act, R.array.weapons, Weapon.DIRECTORY_WEAPON);
+ Utils.resRawToFilesDir(act, R.array.teams, Team.DIRECTORY_TEAMS);
buffer = new byte[8192];//allocate the buffer
return DownloadAssets.copyFileOrDir(act, "Data");
}
--- a/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/StartGameActivity.java Sun Feb 19 16:51:22 2012 +0100
+++ b/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/StartGameActivity.java Mon Feb 20 21:22:04 2012 +0100
@@ -56,17 +56,6 @@
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
- SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);
- boolean firstTime = sharedPref.getBoolean("firstTime", true);
- //Copy all the xml files to the device TODO only do first time launch of the app...
- if(firstTime){
- sharedPref.edit().putBoolean("firstTime", false).commit();
-
- Utils.resRawToFilesDir(this,R.array.schemes, Scheme.DIRECTORY_SCHEME);
- Utils.resRawToFilesDir(this, R.array.weapons, Weapon.DIRECTORY_WEAPON);
- Utils.resRawToFilesDir(this, R.array.teams, Team.DIRECTORY_TEAMS);
- }
-
Scheme.parseBasicFlags(this);
config = new GameConfig();