mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 917480 - Part 0: refactor checking of isGeckoPref inside GeckoPreferences. r=liuche
This commit is contained in:
parent
ff0fbdecbb
commit
bd644d2628
@ -439,13 +439,25 @@ public class GeckoPreferences
|
||||
// saved when the orientation changes. It uses the
|
||||
// "android.not_a_preference.privacy.clear" key - which doesn't
|
||||
// exist in Gecko - to satisfy this requirement.
|
||||
if (key != null && !key.startsWith(NON_PREF_PREFIX)) {
|
||||
if (isGeckoPref(key)) {
|
||||
prefs.add(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isGeckoPref(String key) {
|
||||
if (TextUtils.isEmpty(key)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (key.startsWith(NON_PREF_PREFIX)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore default search engines in Gecko and retrigger a search engine refresh.
|
||||
*/
|
||||
@ -612,7 +624,7 @@ public class GeckoPreferences
|
||||
}
|
||||
|
||||
// Send Gecko-side pref changes to Gecko
|
||||
if (!TextUtils.isEmpty(prefName) && !prefName.startsWith(NON_PREF_PREFIX)) {
|
||||
if (isGeckoPref(prefName)) {
|
||||
PrefsHelper.setPref(prefName, newValue);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user