bug 719560 - Can't publish split native and xul builds under the same product on android market r=mbrubeck a=akeybl
☠☠ backed out by 5c99a7357e6c ☠ ☠
authorBrad Lassey <blassey@mozilla.com>
Thu, 19 Jan 2012 16:52:44 -0500
changeset 85226 33e29c66740d5a1412b5baf7245d9b3fd9a238d5
parent 85225 9e132f1db91b0e965e293ce77fc7239a47a0cbea
child 85227 5a14daa40e666123694cd2e7816181ff91043f90
push id534
push userblassey@mozilla.com
push dateThu, 02 Feb 2012 20:40:49 +0000
treeherdermozilla-beta@33e29c66740d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmbrubeck, akeybl
bugs719560
milestone11.0
bug 719560 - Can't publish split native and xul builds under the same product on android market r=mbrubeck a=akeybl
configure.in
embedding/android/AndroidManifest.xml.in
embedding/android/Makefile.in
mobile/xul/branding/aurora/configure.sh
mobile/xul/branding/beta/configure.sh
mobile/xul/branding/nightly/configure.sh
mobile/xul/branding/official/configure.sh
mobile/xul/branding/unofficial/configure.sh
--- a/configure.in
+++ b/configure.in
@@ -453,16 +453,19 @@ case "$target" in
     ANDROID_TOOLCHAIN="${android_toolchain}"
     ANDROID_PLATFORM="${android_platform}"
     ANDROID_SDK="${android_sdk}"
     ANDROID_PLATFORM_TOOLS="${android_platform_tools}"
     ANDROID_VERSION="${android_version}"
     if test -z "$ANDROID_PACKAGE_NAME" ; then
         ANDROID_PACKAGE_NAME='org.mozilla.$(MOZ_APP_NAME)'
     fi
+    if test -z "$MOZ_MOBILE_COMPAT" ; then
+        MOZ_MOBILE_COMPAT='All'
+    fi
 
     AC_DEFINE(ANDROID)
     AC_DEFINE_UNQUOTED(ANDROID_VERSION, $android_version)
     AC_SUBST(ANDROID_VERSION)
     CROSS_COMPILE=1
     MOZ_CHROME_FILE_FORMAT=omni
     ZLIB_DIR=yes
     ;;
@@ -474,16 +477,17 @@ esac
 fi
 
 AC_SUBST(ANDROID_NDK)
 AC_SUBST(ANDROID_TOOLCHAIN)
 AC_SUBST(ANDROID_PLATFORM)
 AC_SUBST(ANDROID_SDK)
 AC_SUBST(ANDROID_PLATFORM_TOOLS)
 AC_SUBST(ANDROID_PACKAGE_NAME)
+AC_SUBST(MOZ_MOBILE_COMPAT)
 AC_SUBST(OBJCOPY)
 
 dnl ========================================================
 dnl Checks for compilers.
 dnl ========================================================
 dnl Set CROSS_COMPILE in the environment when running configure
 dnl to use the cross-compile setup for now
 dnl ========================================================
--- a/embedding/android/AndroidManifest.xml.in
+++ b/embedding/android/AndroidManifest.xml.in
@@ -4,19 +4,27 @@
       package="@ANDROID_PACKAGE_NAME@"
       android:installLocation="auto"
       android:versionCode="@ANDROID_VERSION_CODE@"
       android:versionName="@MOZ_APP_VERSION@"
 #ifdef MOZ_ANDROID_SHARED_ID
       android:sharedUserId="@MOZ_ANDROID_SHARED_ID@"
 #endif
       >
+
     <uses-sdk android:minSdkVersion="5"
               android:targetSdkVersion="11"/>
 
+#ifdef MOZ_TABLETS_ONLY
+    <supports-screens android:smallScreens="false"
+                      android:normalScreens="false"
+                      android:largeScreens="false"
+                      android:xlargeScreens="true" />
+#endif
+
     <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
     <uses-permission android:name="android.permission.INTERNET"/>
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
     <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/>
 
     <uses-permission android:name="android.permission.WAKE_LOCK"/>
     <uses-permission android:name="android.permission.VIBRATE"/>
--- a/embedding/android/Makefile.in
+++ b/embedding/android/Makefile.in
@@ -69,31 +69,37 @@ PROCESSEDJAVAFILES = \
 
 ifneq (,$(findstring -march=armv7,$(OS_CFLAGS)))
 MIN_CPU_VERSION=7
 else
 MIN_CPU_VERSION=5
 endif
 
 ifeq (,$(ANDROID_VERSION_CODE))
-ANDROID_VERSION_CODE=$(shell $(PYTHON) $(topsrcdir)/toolkit/xre/make-platformini.py --print-buildid | cut -c1-10)
+# increment the version code by 1 so xul fennec will win any compatability ties
+ANDROID_VERSION_CODE=$(shell echo `$(PYTHON) $(topsrcdir)/toolkit/xre/make-platformini.py --print-buildid | cut -c1-10` + 1 | bc)
 endif
 
 DEFINES += \
   -DANDROID_PACKAGE_NAME=$(ANDROID_PACKAGE_NAME) \
   -DMOZ_APP_DISPLAYNAME="$(MOZ_APP_DISPLAYNAME)" \
   -DMOZ_APP_NAME=$(MOZ_APP_NAME) \
   -DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \
   -DMOZ_CHILD_PROCESS_NAME=$(MOZ_CHILD_PROCESS_NAME) \
   -DMOZ_MIN_CPU_VERSION=$(MIN_CPU_VERSION) \
   -DMOZ_CRASHREPORTER=$(MOZ_CRASHREPORTER) \
   -DANDROID_VERSION_CODE=$(ANDROID_VERSION_CODE) \
   -DMOZILLA_OFFICIAL=$(MOZILLA_OFFICIAL) \
   $(NULL)
 
+MOZ_MOBILE_COMPAT = @MOZ_MOBILE_COMPAT@
+ifeq (Tablets,$(MOZ_MOBILE_COMPAT))
+DEFINES += -DMOZ_TABLETS_ONLY=1
+endif
+
 GARBAGE += \
   AndroidManifest.xml  \
   classes.dex  \
   $(PROCESSEDJAVAFILES) \
   gecko.ap_  \
   res/values/strings.xml \
   R.java \
   $(NULL)
--- a/mobile/xul/branding/aurora/configure.sh
+++ b/mobile/xul/branding/aurora/configure.sh
@@ -1,3 +1,4 @@
 MOZ_APP_DISPLAYNAME=Aurora
 ANDROID_PACKAGE_NAME=org.mozilla.fennec_aurora
 MOZ_UPDATER=1
+MOZ_MOBILE_COMPAT=Tablets
--- a/mobile/xul/branding/beta/configure.sh
+++ b/mobile/xul/branding/beta/configure.sh
@@ -1,3 +1,4 @@
 MOZ_APP_DISPLAYNAME="Firefox Beta"
 ANDROID_PACKAGE_NAME=org.mozilla.firefox_beta
 MOZ_UPDATER=
+MOZ_MOBILE_COMPAT=Tablets
--- a/mobile/xul/branding/nightly/configure.sh
+++ b/mobile/xul/branding/nightly/configure.sh
@@ -1,2 +1,3 @@
 MOZ_APP_DISPLAYNAME=Nightly
 MOZ_UPDATER=1
+MOZ_MOBILE_COMPAT=All
--- a/mobile/xul/branding/official/configure.sh
+++ b/mobile/xul/branding/official/configure.sh
@@ -1,3 +1,4 @@
 MOZ_APP_DISPLAYNAME=Firefox
 ANDROID_PACKAGE_NAME=org.mozilla.firefox
 MOZ_UPDATER=
+MOZ_MOBILE_COMPAT=Tablets
--- a/mobile/xul/branding/unofficial/configure.sh
+++ b/mobile/xul/branding/unofficial/configure.sh
@@ -1,3 +1,4 @@
 ANDROID_PACKAGE_NAME=org.mozilla.fennec_`echo $USER`
 MOZ_APP_DISPLAYNAME=Fennec
 MOZ_UPDATER=
+MOZ_MOBILE_COMPAT=All