Bug 1242213 - Part 3: Use android:packageName="org.mozilla.gecko" and --rename-manifest-package. r?mfinkle draft
authorNick Alexander <nalexander@mozilla.com>
Sun, 24 Jan 2016 22:00:30 -0800
changeset 325469 9ac167b66ad752b525e1cae01b9de2f3f6657fbc
parent 325468 4a98e0ac5d422a7494c9656d39ea9c325f7f99b1
child 513446 9c026833400a135cf42f7f17214e67a0238492aa
push id9977
push usernalexander@mozilla.com
push dateMon, 25 Jan 2016 16:50:39 +0000
reviewersmfinkle
bugs1242213
milestone46.0a1
Bug 1242213 - Part 3: Use android:packageName="org.mozilla.gecko" and --rename-manifest-package. r?mfinkle I have manually verified that this results in a byte-identical gecko.ap_. This is because after the earlier patches there are no definitions (or aliases) that are package-local (like .App or .Webapp), which are the only things (other than the Android package name) that get rewritten by --rename-manifest-package.
mobile/android/base/AndroidManifest.xml.in
mobile/android/base/Makefile.in
--- a/mobile/android/base/AndroidManifest.xml.in
+++ b/mobile/android/base/AndroidManifest.xml.in
@@ -1,12 +1,12 @@
 #filter substitution
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-      package="@ANDROID_PACKAGE_NAME@"
+      package="org.mozilla.gecko"
       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="@MOZ_ANDROID_MIN_SDK_VERSION@"
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -432,16 +432,17 @@ define aapt_command
 		-M AndroidManifest.xml \
 		-I $(ANDROID_SDK)/android.jar \
 		$(if $(MOZ_ANDROID_MAX_SDK_VERSION),--max-res-version $(MOZ_ANDROID_MAX_SDK_VERSION),) \
 		--auto-add-overlay \
 		$$(addprefix -S ,$$(ANDROID_RES_DIRS)) \
 		$$(addprefix -A ,$$(ANDROID_ASSETS_DIRS)) \
 		$(if $(ANDROID_EXTRA_PACKAGES),--extra-packages $$(subst $$(NULL) ,:,$$(strip $$(ANDROID_EXTRA_PACKAGES)))) \
 		$(if $(ANDROID_EXTRA_RES_DIRS),$$(addprefix -S ,$$(ANDROID_EXTRA_RES_DIRS))) \
+		--rename-manifest-package $(ANDROID_PACKAGE_NAME) \
 		--custom-package org.mozilla.gecko \
 		--non-constant-id \
 		-F $(3) \
 		-J $(4) \
 		--output-text-symbols $(5) \
 		$(if $(MOZ_ANDROID_RESOURCE_CONSTRAINED),-c $(CONSTRAINED_AAPT_CONFIGURATIONS),) \
 		--ignore-assets "$$(ANDROID_AAPT_IGNORE)"
 endef