Bug 1248160 - Part 3: Move MOZ_ANDROID_SHARED_ID to branding; remove mobile/android/defs.mk. r=ted.mielczarek
authorNick Alexander <nalexander@mozilla.com>
Sat, 13 Feb 2016 10:19:25 -0800
changeset 285118 7d4147c08c3e554544c4607766b1983d5922c0a6
parent 285117 8c4b08c0d438387841ebd6ac973cdeb2911cd1a2
child 285119 786bf7c76f8a5dd2802c14dc69b9a18defcf6d2b
push idunknown
push userunknown
push dateunknown
reviewersted
bugs1248160
milestone47.0a1
Bug 1248160 - Part 3: Move MOZ_ANDROID_SHARED_ID to branding; remove mobile/android/defs.mk. r=ted.mielczarek MozReview-Commit-ID: KAxIYsHvAC4
configure.in
mobile/android/branding/aurora/configure.sh
mobile/android/branding/beta/configure.sh
mobile/android/branding/nightly/configure.sh
mobile/android/branding/official/configure.sh
mobile/android/defs.mk
--- a/configure.in
+++ b/configure.in
@@ -8557,20 +8557,22 @@ AC_SUBST(MOZ_CHILD_PROCESS_BUNDLE)
 # - MOZ_APP_NAME: Used for e.g. the binary program file name. If not set,
 # defaults to a lowercase form of MOZ_APP_BASENAME.
 # - MOZ_APP_REMOTINGNAME: Used for the internal program name, which affects
 # profile name and remoting. If not set, defaults to MOZ_APP_NAME.
 # - MOZ_APP_PROFILE: When set, used for application.ini's
 # "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
+# - 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.
 # - 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
@@ -8579,16 +8581,24 @@ fi
 if test -z "$MOZ_APP_VERSION_DISPLAY"; then
    MOZ_APP_VERSION_DISPLAY=$MOZ_APP_VERSION
 fi
 
 if test -z "$ANDROID_PACKAGE_NAME" ; then
    ANDROID_PACKAGE_NAME="org.mozilla.$MOZ_APP_NAME"
 fi
 
+# Mozilla released Firefox for Android {Release,Beta} and {Aurora,Nightly} to
+# the public with specific common shared IDs and we need to keep them
+# consistent forever.  The specific common values are set by per-channel
+# branding; all other channels use a generic sharedID, set below.
+if test -z "$MOZ_ANDROID_SHARED_ID" ; then
+   MOZ_ANDROID_SHARED_ID="${ANDROID_PACKAGE_NAME}.sharedID"
+fi
+
 # For extensions and langpacks, we require a max version that is compatible
 # across security releases. MOZ_APP_MAXVERSION is our method for doing that.
 # 24.0a1 and 24.0a2 aren't affected
 # 24.0 becomes 24.*
 # 24.1.1 becomes 24.*
 IS_ALPHA=`echo $MOZ_APP_VERSION | grep a`
 if test -z "$IS_ALPHA"; then
   changequote(,)
@@ -8609,16 +8619,17 @@ AC_DEFINE_UNQUOTED(MOZ_B2G_OS_NAME,"$MOZ
 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(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)
--- a/mobile/android/branding/aurora/configure.sh
+++ b/mobile/android/branding/aurora/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=Aurora
 ANDROID_PACKAGE_NAME=org.mozilla.fennec_aurora
 MOZ_UPDATER=1
 MOZ_ANDROID_ANR_REPORTER=1
+MOZ_ANDROID_SHARED_ID=org.mozilla.fennec.sharedID
--- a/mobile/android/branding/beta/configure.sh
+++ b/mobile/android/branding/beta/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="Firefox Beta"
 ANDROID_PACKAGE_NAME=org.mozilla.firefox_beta
 MOZ_UPDATER=
 MOZ_ANDROID_ANR_REPORTER=
+MOZ_ANDROID_SHARED_ID=org.mozilla.firefox.sharedID
--- a/mobile/android/branding/nightly/configure.sh
+++ b/mobile/android/branding/nightly/configure.sh
@@ -1,7 +1,8 @@
 # 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
--- a/mobile/android/branding/official/configure.sh
+++ b/mobile/android/branding/official/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=Firefox
 ANDROID_PACKAGE_NAME=org.mozilla.firefox
 MOZ_UPDATER=
 MOZ_ANDROID_ANR_REPORTER=
+MOZ_ANDROID_SHARED_ID=org.mozilla.firefox.sharedID
deleted file mode 100644
--- a/mobile/android/defs.mk
+++ /dev/null
@@ -1,13 +0,0 @@
-MOZ_ANDROID_SHARED_ID = $(ANDROID_PACKAGE_NAME).sharedID
-
-# We released these builds to the public with shared IDs and need to
-# keep them consistent.
-ifeq (org.mozilla.firefox,$(ANDROID_PACKAGE_NAME))
-MOZ_ANDROID_SHARED_ID = org.mozilla.firefox.sharedID
-else ifeq (org.mozilla.firefox_beta,$(ANDROID_PACKAGE_NAME))
-MOZ_ANDROID_SHARED_ID = org.mozilla.firefox.sharedID
-else ifeq (org.mozilla.fennec_aurora,$(ANDROID_PACKAGE_NAME))
-MOZ_ANDROID_SHARED_ID = org.mozilla.fennec.sharedID
-else ifeq (org.mozilla.fennec,$(ANDROID_PACKAGE_NAME))
-MOZ_ANDROID_SHARED_ID = org.mozilla.fennec.sharedID
-endif