Bug 1252694 - Set MOZ_ANDROID_GCM_SENDERID directly in branding. r?glandium
Non-Mozilla distributors may wish to run their own autopush endpoint,
using a sender ID and corresponding Google API key that they control.
This simplifies that just a little bit, and gets Mozilla's release
engineering out of the business of managing non-sensitive secrets.
In the future, this sender ID will be baked into the Android APK's
string resources, in accordance with newer Google Play Services
library requirements.
MozReview-Commit-ID: AAxreEP73B0
--- a/mobile/android/branding/aurora/configure.sh
+++ b/mobile/android/branding/aurora/configure.sh
@@ -2,8 +2,9 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
MOZ_APP_DISPLAYNAME=Aurora
ANDROID_PACKAGE_NAME=org.mozilla.fennec_aurora
MOZ_UPDATER=1
MOZ_ANDROID_ANR_REPORTER=1
MOZ_ANDROID_SHARED_ID=org.mozilla.fennec.sharedID
+MOZ_ANDROID_GCM_SENDERID=829133274407
--- a/mobile/android/branding/beta/configure.sh
+++ b/mobile/android/branding/beta/configure.sh
@@ -2,8 +2,9 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
MOZ_APP_DISPLAYNAME="Firefox Beta"
ANDROID_PACKAGE_NAME=org.mozilla.firefox_beta
MOZ_UPDATER=
MOZ_ANDROID_ANR_REPORTER=
MOZ_ANDROID_SHARED_ID=org.mozilla.firefox.sharedID
+MOZ_ANDROID_GCM_SENDERID=829133274407
--- a/mobile/android/branding/nightly/configure.sh
+++ b/mobile/android/branding/nightly/configure.sh
@@ -1,8 +1,9 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
MOZ_APP_DISPLAYNAME=Nightly
MOZ_UPDATER=1
MOZ_ANDROID_ANR_REPORTER=1
MOZ_ANDROID_SHARED_ID=org.mozilla.fennec.sharedID
+MOZ_ANDROID_GCM_SENDERID=829133274407
--- a/mobile/android/branding/official/configure.sh
+++ b/mobile/android/branding/official/configure.sh
@@ -2,8 +2,9 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
MOZ_APP_DISPLAYNAME=Firefox
ANDROID_PACKAGE_NAME=org.mozilla.firefox
MOZ_UPDATER=
MOZ_ANDROID_ANR_REPORTER=
MOZ_ANDROID_SHARED_ID=org.mozilla.firefox.sharedID
+MOZ_ANDROID_GCM_SENDERID=829133274407
--- a/mobile/android/branding/unofficial/configure.sh
+++ b/mobile/android/branding/unofficial/configure.sh
@@ -1,8 +1,9 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
ANDROID_PACKAGE_NAME=org.mozilla.fennec_`echo $USER | sed 's/-/_/g'`
MOZ_APP_DISPLAYNAME="Fennec `echo $USER | sed 's/-/_/g'`"
MOZ_UPDATER=
MOZ_ANDROID_ANR_REPORTER=
+MOZ_ANDROID_GCM_SENDERID=829133274407
--- a/old-configure.in
+++ b/old-configure.in
@@ -3695,17 +3695,16 @@ USE_ARM_KUSER=
BUILD_CTYPES=1
MOZ_USE_NATIVE_POPUP_WINDOWS=
MOZ_ANDROID_HISTORY=
MOZ_WEBSMS_BACKEND=
MOZ_ANDROID_BEAM=
MOZ_LOCALE_SWITCHER=
MOZ_ANDROID_SEARCH_ACTIVITY=
MOZ_ANDROID_DOWNLOADS_INTEGRATION=
-MOZ_ANDROID_GCM=
MOZ_ANDROID_MLS_STUMBLER=
MOZ_EXCLUDE_HYPHENATION_DICTIONARIES=
MOZ_INSTALL_TRACKING=
MOZ_SWITCHBOARD=
ACCESSIBILITY=1
MOZ_TIME_MANAGER=
MOZ_SIMPLEPUSH=
MOZ_PAY=
@@ -3851,24 +3850,16 @@ AC_SUBST(MOZ_BING_API_KEY)
# Allow specifying an Adjust SDK key file that contains the app token used for
# Adjust SDK requests.
MOZ_ARG_WITH_STRING(adjust-sdk-keyfile,
[ --with-adjust-sdk-keyfile=file Use the app token contained in the given keyfile for Adjust SDK requests],
MOZ_INSTALL_TRACKING_ADJUST_SDK_APP_TOKEN=`cat $withval`)
AC_SUBST(MOZ_INSTALL_TRACKING_ADJUST_SDK_APP_TOKEN)
-# Allow specifying a GCM sender ID key file that contains the sender ID used for
-# GCM requests. Note that GCM sender IDs are not sensitive: see, for example,
-# http://stackoverflow.com/a/18216063.
-MOZ_ARG_WITH_STRING(gcm-senderid-keyfile,
-[ --with-gcm-senderid-keyfile=file GCM sender ID for GCM requests],
- MOZ_ANDROID_GCM_SENDERID=`cat $withval`)
-AC_SUBST(MOZ_ANDROID_GCM_SENDERID)
-
# Whether this APK is destined for resource constrained devices.
# We want this in mobile/android/confvars.sh, so it goes early.
MOZ_ARG_ENABLE_BOOL(android-resource-constrained,
[ --enable-android-resource-constrained
Exclude hi-res images and similar from the final APK],
MOZ_ANDROID_RESOURCE_CONSTRAINED=1)
if test -n "$MOZ_ANDROID_RESOURCE_CONSTRAINED"; then
@@ -8571,17 +8562,19 @@ AC_SUBST(MOZ_CHILD_PROCESS_BUNDLE)
# "Profile" field, which controls profile location.
# - MOZ_APP_ID: When set, used for application.ini's "ID" field, and
# crash reporter server url.
# - MOZ_APP_ANDROID_VERSION_CODE: On Android, "android:versionCode" for
# the main application is set to the value of this variable. If not
# set, it falls back to a Mozilla-specific value derived from the
# build ID.
# - MOZ_ANDROID_SHARED_ID: On Android, "android:sharedUserId" for all Android
-# - packages produced.
+# packages produced.
+# - MOZ_ANDROID_GCM_SENDERID: On Android, the Android GCM Sender ID used. GCM
+# sender IDs are not sensitive: see, http://stackoverflow.com/a/18216063.
# - MOZ_PROFILE_MIGRATOR: When set, enables profile migrator.
if test -z "$MOZ_APP_NAME"; then
MOZ_APP_NAME=`echo $MOZ_APP_BASENAME | tr A-Z a-z`
fi
if test -z "$MOZ_APP_REMOTINGNAME"; then
MOZ_APP_REMOTINGNAME=$MOZ_APP_NAME
@@ -8629,16 +8622,17 @@ AC_SUBST(MOZ_APP_NAME)
AC_SUBST(MOZ_APP_REMOTINGNAME)
AC_SUBST(MOZ_APP_DISPLAYNAME)
AC_SUBST(MOZ_APP_BASENAME)
AC_SUBST(MOZ_APP_VENDOR)
AC_SUBST(MOZ_APP_PROFILE)
AC_SUBST(MOZ_APP_ID)
AC_SUBST(MOZ_APP_ANDROID_VERSION_CODE)
AC_SUBST(MOZ_ANDROID_SHARED_ID)
+AC_SUBST(MOZ_ANDROID_GCM_SENDERID)
AC_SUBST(MAR_CHANNEL_ID)
AC_SUBST(ACCEPTED_MAR_CHANNEL_IDS)
AC_SUBST(MOZ_PROFILE_MIGRATOR)
AC_DEFINE_UNQUOTED(MOZ_APP_UA_NAME, "$MOZ_APP_UA_NAME")
AC_SUBST(MOZ_APP_UA_NAME)
AC_DEFINE_UNQUOTED(MOZ_APP_UA_VERSION, "$MOZ_APP_VERSION")
AC_SUBST(MOZ_APP_VERSION)
AC_SUBST(MOZ_APP_VERSION_DISPLAY)