Bug 1252666 - Part 3: Enable DOM Push API in Fennec Nightly. r?margaret draft
authorNick Alexander <nalexander@mozilla.com>
Fri, 04 Mar 2016 15:56:36 -0800
changeset 338145 06ba912f3b8d1ca58a414156484cfb2a73b22b1c
parent 338144 7cc3277401d2f80146e0b4d7f17017ba0a2a8f50
child 515738 5fd41e45de0ea288fc6a14393f882408fd77de55
push id12443
push usernalexander@mozilla.com
push dateTue, 08 Mar 2016 17:31:25 +0000
reviewersmargaret
bugs1252666
milestone47.0a1
Bug 1252666 - Part 3: Enable DOM Push API in Fennec Nightly. r?margaret MozReview-Commit-ID: 19pThtRMN6r
mobile/android/app/mobile.js
mobile/android/app/moz.build
mobile/android/base/FennecManifest_permissions.xml.in
--- a/mobile/android/app/mobile.js
+++ b/mobile/android/app/mobile.js
@@ -954,16 +954,25 @@ pref("dom.vr.cardboard.enabled", true);
 // Enable VR on mobile, making it enable by default.
 pref("dom.vr.enabled", true);
 #endif
 
 pref("browser.tabs.showAudioPlayingIcon", true);
 
 pref("dom.serviceWorkers.enabled", true);
 
+pref("dom.push.debug", false);
+// The upstream autopush endpoint must have the Google API key corresponding to
+// the App's sender ID; we bake this assumption directly into the URL.
+pref("dom.push.serverURL", "https://updates-autopush.stage.mozaws.net/v1/gcm/@MOZ_ANDROID_GCM_SENDERID@");
+
+#ifdef MOZ_ANDROID_GCM
+pref("dom.push.enabled", true);
+#endif
+
 // The remote content URL where FxAccountsWebChannel messages originate.  Must use HTTPS.
 pref("identity.fxaccounts.remote.webchannel.uri", "https://accounts.firefox.com");
 
 // The remote URL of the Firefox Account profile server.
 pref("identity.fxaccounts.remote.profile.uri", "https://profile.accounts.firefox.com/v1");
 
 // The remote URL of the Firefox Account oauth server.
 pref("identity.fxaccounts.remote.oauth.uri", "https://oauth.accounts.firefox.com/v1");
--- a/mobile/android/app/moz.build
+++ b/mobile/android/app/moz.build
@@ -5,16 +5,24 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 for var in ('APP_NAME', 'APP_VERSION'):
     DEFINES[var] = CONFIG['MOZ_%s' % var]
 
 for var in ('MOZ_UPDATER', 'MOZ_APP_UA_NAME', 'ANDROID_PACKAGE_NAME'):
     DEFINES[var] = CONFIG[var]
 
+for var in ('MOZ_ANDROID_GCM', ):
+    if CONFIG[var]:
+        DEFINES[var] = 1
+
+for var in ('MOZ_ANDROID_GCM_SENDERID', ):
+    if CONFIG[var]:
+        DEFINES[var] = CONFIG[var]
+
 if CONFIG['MOZ_PKG_SPECIAL']:
     DEFINES['MOZ_PKG_SPECIAL'] = CONFIG['MOZ_PKG_SPECIAL']
 
 JS_PREFERENCE_PP_FILES += [
      'mobile.js',
 ]
 
 FINAL_TARGET_PP_FILES += [
--- a/mobile/android/base/FennecManifest_permissions.xml.in
+++ b/mobile/android/base/FennecManifest_permissions.xml.in
@@ -6,20 +6,18 @@
 
 #include ../services/manifests/FxAccountAndroidManifest_permissions.xml.in
 
 #ifdef MOZ_ANDROID_SEARCH_ACTIVITY
 #include ../search/manifests/SearchAndroidManifest_permissions.xml.in
 #endif
 
 #ifdef MOZ_ANDROID_GCM
-#ifdef NIGHTLY_BUILD
 #include GcmAndroidManifest_permissions.xml.in
 #endif
-#endif
 
     <!-- A signature level permission specific to each Firefox version (Android
          package name, e.g., org.mozilla.firefox).  Use this permission to
          broadcast securely within a single Firefox version.  This needs to
          agree with GlobalConstants.PER_ANDROID_PACKAGE_PERMISSION. -->
     <permission
         android:name="@ANDROID_PACKAGE_NAME@.permission.PER_ANDROID_PACKAGE"
         android:protectionLevel="signature"/>