mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-24 18:45:28 +00:00
Fix locale settings duplicate
This commit is contained in:
parent
58acc75cf6
commit
0275a8558d
@ -127,6 +127,7 @@ public class SettingsActivity extends Activity {
|
|||||||
private ListPreference setLocalePreference(ListPreference lp) {
|
private ListPreference setLocalePreference(ListPreference lp) {
|
||||||
if (lp == null) {
|
if (lp == null) {
|
||||||
lp = new ListPreference(getActivity());
|
lp = new ListPreference(getActivity());
|
||||||
|
generalCatagory.addPreference(lp);
|
||||||
}
|
}
|
||||||
CharSequence[] entries = new CharSequence[magiskManager.locales.size() + 1];
|
CharSequence[] entries = new CharSequence[magiskManager.locales.size() + 1];
|
||||||
CharSequence[] entryValues = new CharSequence[magiskManager.locales.size() + 1];
|
CharSequence[] entryValues = new CharSequence[magiskManager.locales.size() + 1];
|
||||||
@ -255,12 +256,11 @@ public class SettingsActivity extends Activity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onTrigger(CallbackEvent event) {
|
public void onTrigger(CallbackEvent event) {
|
||||||
ListPreference language = setLocalePreference(null);
|
ListPreference language = setLocalePreference((ListPreference) findPreference("locale"));
|
||||||
language.setOnPreferenceClickListener((pref) -> {
|
language.setOnPreferenceClickListener((pref) -> {
|
||||||
setLocalePreference((ListPreference) pref);
|
setLocalePreference((ListPreference) pref);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
generalCatagory.addPreference(language);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user