mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-17 08:35:37 -04:00
Fixes
- (Attempt fix) arm32/aarch32 auto uninstall for some reasons. - Preference not applied correctly
This commit is contained in:
parent
5fda5d318a
commit
235282d812
@ -203,9 +203,6 @@ public class PojavLauncherActivity extends BaseLauncherActivity
|
||||
}
|
||||
|
||||
public void statusIsLaunching(boolean isLaunching) {
|
||||
// As preference fragment put to tab, changes without notice, so need re-load pref
|
||||
if (isLaunching) LauncherPreferences.loadPreferences();
|
||||
|
||||
LinearLayout.LayoutParams reparam = new LinearLayout.LayoutParams((int) updateWidthHeight(), LinearLayout.LayoutParams.WRAP_CONTENT);
|
||||
ViewGroup.MarginLayoutParams lmainTabParam = (ViewGroup.MarginLayoutParams) fullTab.getLayoutParams();
|
||||
int launchVisibility = isLaunching ? View.VISIBLE : View.GONE;
|
||||
|
@ -308,7 +308,7 @@ public class PojavLoginActivity extends BaseActivity
|
||||
private boolean isJavaRuntimeInstalled(AssetManager am) {
|
||||
boolean prefValue = firstLaunchPrefs.getBoolean(PREF_IS_INSTALLED_JAVARUNTIME, false);
|
||||
try {
|
||||
return prefValue && Tools.read(new FileInputStream(Tools.homeJreDir+"/version")).equals(Tools.read(am.open("components/jre/version")));
|
||||
return prefValue && (am.open("components/jre/bin-" + Tools.currentArch.split("/")[0] + ".tar.xz") == null || Tools.read(new FileInputStream(Tools.homeJreDir+"/version")).equals(Tools.read(am.open("components/jre/version"))));
|
||||
} catch(IOException e) {
|
||||
Log.e("JVMCtl","failed to read file",e);
|
||||
return prefValue;
|
||||
|
@ -15,7 +15,8 @@ public class LauncherPreferenceActivity extends MinePrefActivity
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
super.onBackPressed();
|
||||
LauncherPreferences.loadPreferences();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -6,8 +6,9 @@ import android.support.v7.preference.*;
|
||||
import net.kdt.pojavlaunch.*;
|
||||
|
||||
import net.kdt.pojavlaunch.R;
|
||||
import android.content.*;
|
||||
|
||||
public class LauncherPreferenceFragment extends PreferenceFragmentCompat
|
||||
public class LauncherPreferenceFragment extends PreferenceFragmentCompat implements SharedPreferences.OnSharedPreferenceChangeListener
|
||||
{
|
||||
@Override
|
||||
public void onCreatePreferences(Bundle b, String str) {
|
||||
@ -30,12 +31,22 @@ public class LauncherPreferenceFragment extends PreferenceFragmentCompat
|
||||
seek4.setMin(20);
|
||||
seek4.setMax(500);
|
||||
seek4.setValue((int) LauncherPreferences.PREF_MOUSESCALE);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHiddenChanged(boolean hidden) {
|
||||
super.onHiddenChanged(hidden);
|
||||
if (hidden) LauncherPreferences.loadPreferences();
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
getPreferenceManager().getSharedPreferences().registerOnSharedPreferenceChangeListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
getPreferenceManager().getSharedPreferences().unregisterOnSharedPreferenceChangeListener(this);
|
||||
super.onPause();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSharedPreferenceChanged(SharedPreferences p, String s) {
|
||||
LauncherPreferences.loadPreferences();
|
||||
}
|
||||
}
|
||||
|
@ -198,6 +198,9 @@
|
||||
<string name="customctrl_dynamicpos">Dynamic position</string>
|
||||
<string name="customctrl_dynamicpos_x">Dynamic X</string>
|
||||
<string name="customctrl_dynamicpos_y">Dynamic Y</string>
|
||||
|
||||
<string name="customctrl_transparency_bg">Background transparency</string>
|
||||
<string name="customctrl_transparency_text">Text transparency</string>
|
||||
|
||||
<string name="customctrl_keycombine">Key combination</string>
|
||||
<string name="customctrl_keycombine_alt">Alt</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user