mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-24 10:35:26 +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) {
|
||||
if (lp == null) {
|
||||
lp = new ListPreference(getActivity());
|
||||
generalCatagory.addPreference(lp);
|
||||
}
|
||||
CharSequence[] entries = new CharSequence[magiskManager.locales.size() + 1];
|
||||
CharSequence[] entryValues = new CharSequence[magiskManager.locales.size() + 1];
|
||||
@ -255,12 +256,11 @@ public class SettingsActivity extends Activity {
|
||||
|
||||
@Override
|
||||
public void onTrigger(CallbackEvent event) {
|
||||
ListPreference language = setLocalePreference(null);
|
||||
ListPreference language = setLocalePreference((ListPreference) findPreference("locale"));
|
||||
language.setOnPreferenceClickListener((pref) -> {
|
||||
setLocalePreference((ListPreference) pref);
|
||||
return false;
|
||||
});
|
||||
generalCatagory.addPreference(language);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user