Bug 1376486 - Toggle PWA function by Android preference draft
authorJulian_Chu <walkingice0204@gmail.com>
Thu, 29 Jun 2017 16:18:22 -0700
changeset 602522 4f4a0fb0cb0662e7e28fc65c1da6cbed62364b78
parent 602521 ccf7caec22ea33fff5b73d6568153e0f927090f3
child 635629 cd62014755a6c7ce0c395d5d391d339fabf67a13
push id66464
push userbmo:walkingice0204@gmail.com
push dateFri, 30 Jun 2017 06:17:44 +0000
bugs1376486
milestone56.0a1
Bug 1376486 - Toggle PWA function by Android preference Instead of reading config from about:config, now we read from Android Preference. MozReview-Commit-ID: 9yFdknOx8uH
mobile/android/chrome/content/browser.js
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -4187,17 +4187,17 @@ Tab.prototype = {
           if (!isFeed)
             return;
 
           jsonMessage = this.makeFeedMessage(target, type);
         } else if (list.indexOf("[search]") != -1 && aEvent.type == "DOMLinkAdded") {
           this.sendOpenSearchMessage(target);
         } else if (list.indexOf("[manifest]") != -1 &&
                    aEvent.type == "DOMLinkAdded" &&
-                   Services.prefs.getBoolPref("manifest.install.enabled", false)) {
+                   SharedPreferences.forApp().getBoolPref("android.not_a_preference.pwa")){
           jsonMessage = this.makeManifestMessage(target);
         }
         if (!jsonMessage)
          return;
 
         GlobalEventDispatcher.sendRequest(jsonMessage);
         break;
       }