mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-25 12:07:38 +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…
x
Reference in New Issue
Block a user