mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2026-04-20 01:27:02 -04:00
Re-enable arm64 as it worked; Add option to uninstall java runtime
This commit is contained in:
@@ -28,7 +28,7 @@ android {
|
||||
multiDexEnabled true //important
|
||||
|
||||
ndk {
|
||||
abiFilters "armeabi-v7a" // , "arm64-v8a"
|
||||
abiFilters "armeabi-v7a", "arm64-v8a"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,8 +41,7 @@ public class PojavLoginActivity extends AppCompatActivity
|
||||
|
||||
private SharedPreferences firstLaunchPrefs;
|
||||
// private final String PREF_IS_DONOTSHOWAGAIN_WARN = "isWarnDoNotShowAgain";
|
||||
private final String PREF_IS_INSTALLED_LIBRARIES = "isLibrariesExtracted2";
|
||||
private final String PREF_IS_INSTALLED_JAVARUNTIME = "isJavaRuntimeInstalled";
|
||||
public static final String PREF_IS_INSTALLED_JAVARUNTIME = "isJavaRuntimeInstalled";
|
||||
|
||||
private boolean isInitCalled = false;
|
||||
@Override
|
||||
@@ -294,10 +293,6 @@ public class PojavLoginActivity extends AppCompatActivity
|
||||
private boolean isJavaRuntimeInstalled() {
|
||||
return firstLaunchPrefs.getBoolean(PREF_IS_INSTALLED_JAVARUNTIME, false);
|
||||
}
|
||||
|
||||
private boolean isLibrariesExtracted() {
|
||||
return firstLaunchPrefs.getBoolean(PREF_IS_INSTALLED_LIBRARIES, false);
|
||||
}
|
||||
|
||||
private boolean setPref(String prefName, boolean value) {
|
||||
return firstLaunchPrefs.edit().putBoolean(prefName, value).commit();
|
||||
|
||||
@@ -665,7 +665,6 @@ public final class Tools
|
||||
return out;
|
||||
}
|
||||
|
||||
// Current Useless below but keep it for future usage.
|
||||
public static void deleteRecursive(File fileOrDirectory) {
|
||||
try {
|
||||
if (fileOrDirectory.isDirectory()) {
|
||||
|
||||
@@ -12,14 +12,9 @@ public class LauncherPreferenceFragment extends PreferenceFragmentCompat
|
||||
public void onCreatePreferences(Bundle b, String str) {
|
||||
addPreferencesFromResource(R.xml.pref_main);
|
||||
|
||||
// Disable freeform mode in Android 6.0 or below.
|
||||
// Disable freeform mode in Android 6.0 and below.
|
||||
findPreference("freeform").setEnabled(Build.VERSION.SDK_INT >= 24);
|
||||
|
||||
SeekBarPreference seek1 = (SeekBarPreference) findPreference("maxDxRefs");
|
||||
seek1.setMin(0xFFF);
|
||||
seek1.setMax(0xFFFF);
|
||||
seek1.setValue(0xFFF);
|
||||
|
||||
SeekBarPreference seek2 = (SeekBarPreference) findPreference("timeLongPressTrigger");
|
||||
seek2.setMin(100);
|
||||
seek2.setMax(1000);
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
package net.kdt.pojavlaunch.prefs;
|
||||
|
||||
import android.content.*;
|
||||
import android.support.v7.preference.*;
|
||||
import android.util.*;
|
||||
import java.io.*;
|
||||
import net.kdt.pojavlaunch.*;
|
||||
|
||||
import net.kdt.pojavlaunch.R;
|
||||
import android.widget.*;
|
||||
|
||||
public class UninstallJREDialogPreference extends DialogPreference implements DialogInterface.OnClickListener
|
||||
{
|
||||
public UninstallJREDialogPreference(Context ctx) {
|
||||
this(ctx, null);
|
||||
}
|
||||
|
||||
public UninstallJREDialogPreference(Context ctx, AttributeSet attrs) {
|
||||
super(ctx, attrs);
|
||||
setDialogMessage(R.string.mcl_setting_title_uninstalljre);
|
||||
setPositiveButtonText(android.R.string.ok);
|
||||
setNegativeButtonText(android.R.string.cancel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
if (which == DialogInterface.BUTTON_POSITIVE) {
|
||||
Tools.deleteRecursive(new File(Tools.homeJreDir));
|
||||
getContext().getSharedPreferences("pojav_extract", Context.MODE_PRIVATE)
|
||||
.edit().putBoolean(PojavLoginActivity.PREF_IS_INSTALLED_JAVARUNTIME, false).commit();
|
||||
|
||||
Toast.makeText(getContext(), R.string.toast_uninstalljre_done, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
app/src/main/jniLibs/arm64-v8a/libopenal.so
Normal file
BIN
app/src/main/jniLibs/arm64-v8a/libopenal.so
Normal file
Binary file not shown.
@@ -44,7 +44,7 @@
|
||||
<string name="warning_remove_account">This account will be removed!</string>
|
||||
|
||||
<!-- AlertDialog title -->
|
||||
<string name="alerttitle_install_jre">Install Java Runtime (.tar.xz)</string>
|
||||
<string name="alerttitle_install_jre">Install Java Runtime %s (.tar.xz)</string>
|
||||
<string name="alerttitle_selectkeymap">Select a keymap json</string>
|
||||
<string name="alerttitle_installmod">Select a mod to install</string>
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
<string name="toast_permission_denied">The read/write to storage permission is required!</string>
|
||||
<string name="toast_login_error">Something went wrong after login. Please feedback to the developer.\nError: %s</string>
|
||||
<string name="toast_optifine_success">Install successful</string>
|
||||
<string name="toast_uninstalljre_done">Done uninstall Java Runtime</string>
|
||||
<!--
|
||||
<string name="toast_3">Exit</string>
|
||||
-->
|
||||
@@ -90,8 +91,8 @@
|
||||
<string name="mcl_option_settings">Settings</string>
|
||||
<string name="mcl_option_about">About</string>
|
||||
|
||||
<string name="mcl_setting_title_setmaxdxref">Set max DX references</string>
|
||||
<string name="mcl_setting_subtitle_setmaxdxref">Increase If an error happend while converting: Too many ... references. You may try multi-dex option. Recommended: 4096 or 8192.</string>
|
||||
<string name="mcl_setting_title_uninstalljre">Uninstall Java Runtime</string>
|
||||
<string name="mcl_setting_subtitle_uninstalljre">[Launcher restart required] This let you re-install Java Runtime</string>
|
||||
<string name="mcl_setting_title_freeform">Launch Minecraft in Freeform mode</string>
|
||||
<string name="mcl_setting_subtitle_freeform">Launch Minecraft in floating window. Requires Android 7.0+</string>
|
||||
<string name="mcl_setting_title_longpresstrigger">How long will trigger after long press</string>
|
||||
|
||||
@@ -6,10 +6,9 @@
|
||||
<android.support.v7.preference.PreferenceCategory
|
||||
android:title="@string/mcl_setting_category_general">
|
||||
|
||||
<android.support.v7.preference.SeekBarPreference
|
||||
android:key="maxDxRefs"
|
||||
android:title="@string/mcl_setting_title_setmaxdxref"
|
||||
android:summary="@string/mcl_setting_subtitle_setmaxdxref" />
|
||||
<net.kdt.pojavlaunch.prefs.UninstallJREDialogPreference
|
||||
android:title="@string/mcl_setting_title_uninstalljre"
|
||||
android:summary="@string/mcl_setting_subtitle_uninstalljre" />
|
||||
|
||||
<android.support.v7.preference.SeekBarPreference
|
||||
android:key="timeLongPressTrigger"
|
||||
|
||||
Reference in New Issue
Block a user