зеркало из https://github.com/mozilla/gecko-dev.git
Bug 917480 - Part 0: refactor checking of isGeckoPref inside GeckoPreferences. r=liuche
This commit is contained in:
Родитель
d2f89f7275
Коммит
4b7421aabe
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче