authorRichard Newman <rnewman@mozilla.com>
Fri, 27 Feb 2015 13:42:48 -0800
changeset 250132 cea5c7cdfa13
parent 250131 c59efbb319ff
child 250133 eed281422403
push id4510
push userrnewman@mozilla.com
push date2015-03-01 00:23 +0000
treeherdermozilla-beta@cea5c7cdfa13 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
# Bug 1137586 - Use different computed version codes for split APKs. r=nalexander, a=lmandel Different APKs with the same version code cannot be uploaded to Google Play. We want the later API range version to win, just by default. We need x86 to beat ARMv7 even at a higher API range, because we don't ever want to deliver an ARM APK to an x86 device with an emulation layer. So this patch does the following: * Add the MIN_SDK_VERSION to the version code. That'll give us a gap of 2. * Additionally increment the 9-23 x86 version by 3, so that the 9-23 x86 APK has a higher version code than the 11-23 ARMv7. * Eliminate the ARMv6 logic.
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -9,27 +9,27 @@ DIST_FILES := \
 ifneq (,$(findstring -march=armv7,$(OS_CFLAGS)))
 MOZ_APP_BUILDID=$(shell cat $(DEPTH)/config/buildid)
+# See Bug 1137586 for more details on version code computation.
 ifeq ($(CPU_ARCH),arm)
-ifeq ($(MIN_CPU_VERSION),7)
-ANDROID_VERSION_CODE=$(shell cat $(DEPTH)/config/buildid | cut -c1-10)
-# decrement the version code by 1 for armv6 builds so armv7 builds will win any compatability ties
-ANDROID_VERSION_CODE=$(shell echo $$((`cat $(DEPTH)/config/buildid | cut -c1-10` - 1)))
-else #not arm, so x86
-# increment the version code by 1 for x86 builds so they are offered to x86 phones that have arm emulators
-ANDROID_VERSION_CODE=$(shell echo $$((`cat $(DEPTH)/config/buildid | cut -c1-10` + 1)))
+# Increment by MIN_SDK_VERSION -- this adds 9 to every build ID as a minimum.
+# Our split APK starts at 11.
+ANDROID_VERSION_CODE=$(shell echo $$((`cat $(DEPTH)/config/buildid | cut -c1-10` + $(MOZ_ANDROID_MIN_SDK_VERSION) + 0)))
+else # not ARM, so x86.
+# Increment the version code by 3 for x86 builds so they are offered to x86 phones that have ARM emulators,
+# beating the 2-point advantage that the v11+ ARMv7 APK has.
+# If we change our splits in the future, we'll need to do this further still.
+ANDROID_VERSION_CODE=$(shell echo $$((`cat $(DEPTH)/config/buildid | cut -c1-10` + $(MOZ_ANDROID_MIN_SDK_VERSION) + 3)))
 UA_BUILDID=$(shell echo $(ANDROID_VERSION_CODE) | cut -c1-8)
 MOZ_BUILD_TIMESTAMP=$(shell echo `$(PYTHON) $(topsrcdir)/toolkit/xre/make-platformini.py --print-timestamp`)