mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-10 05:01:29 -04:00
Fix[storage]: fix previous commit not starting the game
This commit is contained in:
parent
9c83fc677b
commit
2f34549f65
@ -19,6 +19,7 @@ import java.util.concurrent.ThreadPoolExecutor;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import net.kdt.pojavlaunch.lifecycle.ContextExecutor;
|
||||
import net.kdt.pojavlaunch.prefs.LauncherPreferences;
|
||||
import net.kdt.pojavlaunch.tasks.AsyncAssetManager;
|
||||
import net.kdt.pojavlaunch.utils.*;
|
||||
import net.kdt.pojavlaunch.utils.FileUtils;
|
||||
@ -57,7 +58,15 @@ public class PojavApplication extends Application {
|
||||
|
||||
try {
|
||||
super.onCreate();
|
||||
if(Tools.checkStorageRoot(this)){
|
||||
// Implicitly initializes early constants and storage constants.
|
||||
// Required to run the main activity properly.
|
||||
LauncherPreferences.loadPreferences(this);
|
||||
} else {
|
||||
// In other cases, only initialize enough for the basicmost basics to work
|
||||
// and not explode.
|
||||
Tools.initEarlyConstants(this);
|
||||
}
|
||||
Tools.DEVICE_ARCHITECTURE = Architecture.getDeviceArchitecture();
|
||||
//Force x86 lib directory for Asus x86 based zenfones
|
||||
if(Architecture.isx86Device() && Architecture.is32BitsDevice()){
|
||||
|
@ -14,6 +14,7 @@ import androidx.annotation.Nullable;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import net.kdt.pojavlaunch.prefs.LauncherPreferences;
|
||||
import net.kdt.pojavlaunch.tasks.AsyncAssetManager;
|
||||
|
||||
public class TestStorageActivity extends Activity {
|
||||
@ -60,8 +61,8 @@ public class TestStorageActivity extends Activity {
|
||||
startActivity(new Intent(this, MissingStorageActivity.class));
|
||||
return;
|
||||
}
|
||||
//Initialize constants after we confirm that we have storage.
|
||||
Tools.initStorageConstants(getApplicationContext());
|
||||
//Initialize constants (implicitly) and preferences after we confirm that we have storage.
|
||||
LauncherPreferences.loadPreferences(this);
|
||||
AsyncAssetManager.unpackComponents(this);
|
||||
AsyncAssetManager.unpackSingleFiles(this);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user