diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-03-25 17:47:59 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-03-25 17:47:59 +0100 |
commit | 917a2c450f08ab4c934c9938319f10a1114272b4 (patch) | |
tree | 79394bdbef8c5bc90734918a9f862efaf6ec2e1a /mobile/android/components/AddonUpdateService.js | |
parent | eb77e289bbe056b58051db0fa868e95da803aa0a (diff) | |
parent | a1ad1d835b66e9300cc011244a23aea5d660baf1 (diff) | |
download | UXP-917a2c450f08ab4c934c9938319f10a1114272b4.tar UXP-917a2c450f08ab4c934c9938319f10a1114272b4.tar.gz UXP-917a2c450f08ab4c934c9938319f10a1114272b4.tar.lz UXP-917a2c450f08ab4c934c9938319f10a1114272b4.tar.xz UXP-917a2c450f08ab4c934c9938319f10a1114272b4.zip |
Merge branch 'master' of https://github.com/MoonchildProductions/UXP
Diffstat (limited to 'mobile/android/components/AddonUpdateService.js')
-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", |