diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-03-29 16:04:01 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-03-29 16:04:01 +0100 |
commit | 88083f8c683c18f4de68a20c863a82a9da65db8f (patch) | |
tree | 926656892d9d80260da02ea8ea71031b140c51df /mobile/android | |
parent | f999f544aad04069b03704d994a99352263f600b (diff) | |
parent | 843e4ceffd6ce21a6e6db37419335eafdc543e18 (diff) | |
download | UXP-88083f8c683c18f4de68a20c863a82a9da65db8f.tar UXP-88083f8c683c18f4de68a20c863a82a9da65db8f.tar.gz UXP-88083f8c683c18f4de68a20c863a82a9da65db8f.tar.lz UXP-88083f8c683c18f4de68a20c863a82a9da65db8f.tar.xz UXP-88083f8c683c18f4de68a20c863a82a9da65db8f.zip |
Merge branch 'master' into Sync-weave
Diffstat (limited to 'mobile/android')
-rw-r--r-- | mobile/android/components/AddonUpdateService.js | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/mobile/android/components/AddonUpdateService.js b/mobile/android/components/AddonUpdateService.js index 2505e2796..b2c4732c3 100644 --- a/mobile/android/components/AddonUpdateService.js +++ b/mobile/android/components/AddonUpdateService.js @@ -23,14 +23,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "Messaging", XPCOMUtils.defineLazyModuleGetter(this, "OS", "resource://gre/modules/osfile.jsm"); -function getPref(func, preference, defaultValue) { - try { - return Services.prefs[func](preference); - } - catch (e) {} - return defaultValue; -} - // ----------------------------------------------------------------------- // Add-on auto-update management service // ----------------------------------------------------------------------- @@ -49,7 +41,7 @@ AddonUpdateService.prototype = { QueryInterface: XPCOMUtils.generateQI([Ci.nsITimerCallback]), notify: function aus_notify(aTimer) { - if (aTimer && !getPref("getBoolPref", PREF_ADDON_UPDATE_ENABLED, true)) + if (aTimer && !Services.prefs.getBoolPref(PREF_ADDON_UPDATE_ENABLED, true)) return; // If we already auto-upgraded and installed new versions, ignore this check @@ -61,7 +53,7 @@ AddonUpdateService.prototype = { let gmp = new GMPInstallManager(); gmp.simpleCheckAndInstall().then(null, () => {}); - let interval = 1000 * getPref("getIntPref", PREF_ADDON_UPDATE_INTERVAL, 86400); + let interval = 1000 * Services.prefs.getIntPref(PREF_ADDON_UPDATE_INTERVAL, 86400); Messaging.sendRequest({ type: "Gecko:ScheduleRun", action: "update-addons", |