mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-12 14:16:58 -04:00
(Android 6+) Default control json now will be saved after user grant storage permission
This commit is contained in:
parent
21eb5c0aa5
commit
a871fb1e48
@ -37,10 +37,6 @@ public class PojavApplication extends Application
|
|||||||
specialButtons[2].name = getString(R.string.control_primary);
|
specialButtons[2].name = getString(R.string.control_primary);
|
||||||
specialButtons[3].name = getString(R.string.control_secondary);
|
specialButtons[3].name = getString(R.string.control_secondary);
|
||||||
specialButtons[4].name = getString(R.string.control_mouse);
|
specialButtons[4].name = getString(R.string.control_mouse);
|
||||||
|
|
||||||
new File(Tools.CTRLMAP_PATH).mkdirs();
|
|
||||||
new CustomControls(this).save(Tools.CTRLDEF_FILE);
|
|
||||||
|
|
||||||
} catch (Throwable th) {
|
} catch (Throwable th) {
|
||||||
Intent ferrorIntent = new Intent(this, FatalErrorActivity.class);
|
Intent ferrorIntent = new Intent(this, FatalErrorActivity.class);
|
||||||
ferrorIntent.putExtra("throwable", th);
|
ferrorIntent.putExtra("throwable", th);
|
||||||
|
@ -22,6 +22,7 @@ import android.system.*;
|
|||||||
import android.net.*;
|
import android.net.*;
|
||||||
import static android.view.ViewGroup.LayoutParams.*;
|
import static android.view.ViewGroup.LayoutParams.*;
|
||||||
import net.kdt.pojavlaunch.update.*;
|
import net.kdt.pojavlaunch.update.*;
|
||||||
|
import net.kdt.pojavlaunch.value.customcontrols.*;
|
||||||
|
|
||||||
public class PojavLoginActivity extends MineActivity
|
public class PojavLoginActivity extends MineActivity
|
||||||
{
|
{
|
||||||
@ -308,6 +309,9 @@ public class PojavLoginActivity extends MineActivity
|
|||||||
try {
|
try {
|
||||||
mkdirs(Tools.MAIN_PATH);
|
mkdirs(Tools.MAIN_PATH);
|
||||||
|
|
||||||
|
mkdirs(Tools.CTRLMAP_PATH);
|
||||||
|
new CustomControls(this).save(Tools.CTRLDEF_FILE);
|
||||||
|
|
||||||
Tools.copyAssetFile(this, "options.txt", Tools.MAIN_PATH, false);
|
Tools.copyAssetFile(this, "options.txt", Tools.MAIN_PATH, false);
|
||||||
|
|
||||||
// Extract launcher_profiles.json
|
// Extract launcher_profiles.json
|
||||||
|
Loading…
x
Reference in New Issue
Block a user