From 29380aa3f93e7ca81eeef833c34f60fc815904f1 Mon Sep 17 00:00:00 2001 From: Marina Samuel Date: Wed, 25 Jan 2012 17:19:59 -0800 Subject: [PATCH] Bug 709660 - correctly process resolution-specific Sync resources. r=mbrubeck r=rnewman --- mobile/android/base/Makefile.in | 25 +++++++++++++++++-- .../sync/android-drawable-hdpi-resources.mn | 1 + .../sync/android-drawable-ldpi-resources.mn | 1 + .../sync/android-drawable-mdpi-resources.mn | 1 + .../sync/android-drawable-resources.mn | 3 --- 5 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 mobile/android/sync/android-drawable-hdpi-resources.mn create mode 100644 mobile/android/sync/android-drawable-ldpi-resources.mn create mode 100644 mobile/android/sync/android-drawable-mdpi-resources.mn diff --git a/mobile/android/base/Makefile.in b/mobile/android/base/Makefile.in index 6da22807bc6..7e86f783922 100644 --- a/mobile/android/base/Makefile.in +++ b/mobile/android/base/Makefile.in @@ -52,6 +52,9 @@ SYNC_JAVA_FILES=$(shell cat $(topsrcdir)/mobile/android/sync/java-sources.mn | t SYNC_PP_JAVA_FILES=$(shell cat $(topsrcdir)/mobile/android/sync/preprocess-sources.mn | tr '\n' ' ';) SYNC_THIRDPARTY_JAVA_FILES=$(shell cat $(topsrcdir)/mobile/android/sync/java-third-party-sources.mn | tr '\n' ' ';) SYNC_RES_DRAWABLE=$(shell cat $(topsrcdir)/mobile/android/sync/android-drawable-resources.mn | tr '\n' ' ';) +SYNC_RES_DRAWABLE_LDPI=$(shell cat $(topsrcdir)/mobile/android/sync/android-drawable-ldpi-resources.mn | tr '\n' ' ';) +SYNC_RES_DRAWABLE_MDPI=$(shell cat $(topsrcdir)/mobile/android/sync/android-drawable-mdpi-resources.mn | tr '\n' ' ';) +SYNC_RES_DRAWABLE_HDPI=$(shell cat $(topsrcdir)/mobile/android/sync/android-drawable-hdpi-resources.mn | tr '\n' ' ';) SYNC_RES_LAYOUT=$(shell cat $(topsrcdir)/mobile/android/sync/android-layout-resources.mn | tr '\n' ' ';) SYNC_RES_VALUES=$(shell cat $(topsrcdir)/mobile/android/sync/android-values-resources.mn | tr '\n' ' ';) SYNC_RES_XML=res/xml/sync_authenticator.xml res/xml/sync_options.xml @@ -539,6 +542,9 @@ RES_DIRS= \ res/xml \ res/anim \ res/drawable-nodpi \ + res/drawable-ldpi \ + res/drawable-mdpi \ + res/drawable-hdpi \ res/drawable-mdpi-v8 \ res/drawable-hdpi-v8 \ res/drawable-mdpi-v9 \ @@ -594,6 +600,21 @@ $(RES_DRAWABLE): $(addprefix $(topsrcdir)/,$(MOZ_ANDROID_DRAWABLES)) $(NSINSTALL) -D res/drawable $(NSINSTALL) $^ res/drawable/ +RES_DRAWABLE_LDPI = $(addprefix res/drawable-ldpi/,$(notdir $(SYNC_RES_DRAWABLE_LDPI))) +$(RES_DRAWABLE_LDPI): $(addprefix $(topsrcdir)/,$(SYNC_RES_DRAWABLE_LDPI)) + $(NSINSTALL) -D res/drawable-ldpi + $(NSINSTALL) $^ res/drawable-ldpi/ + +RES_DRAWABLE_MDPI = $(addprefix res/drawable-mdpi/,$(notdir $(SYNC_RES_DRAWABLE_MDPI))) +$(RES_DRAWABLE_MDPI): $(addprefix $(topsrcdir)/,$(SYNC_RES_DRAWABLE_MDPI)) + $(NSINSTALL) -D res/drawable-mdpi + $(NSINSTALL) $^ res/drawable-mdpi/ + +RES_DRAWABLE_HDPI = $(addprefix res/drawable-hdpi/,$(notdir $(SYNC_RES_DRAWABLE_HDPI))) +$(RES_DRAWABLE_HDPI): $(addprefix $(topsrcdir)/,$(SYNC_RES_DRAWABLE_HDPI)) + $(NSINSTALL) -D res/drawable-hdpi + $(NSINSTALL) $^ res/drawable-hdpi/ + res/values/defaults.xml: $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/res/values/defaults.xml $(NSINSTALL) -D res/values $(NSINSTALL) $^ res/values @@ -607,10 +628,10 @@ $(RESOURCES): $(RES_DIRS) $(subst res/,$(srcdir)/resources/,$(RESOURCES)) $(NSINSTALL) $(subst res/,$(srcdir)/resources/,$@) $(dir $@) -R.java: $(MOZ_APP_ICON) $(RESOURCES) $(RES_DRAWABLE) $(PP_RES_XML) res/values/defaults.xml res/drawable/sync_icon.png res/drawable/icon.png res/drawable-hdpi/icon.png res/values/strings.xml AndroidManifest.xml FORCE +R.java: $(MOZ_APP_ICON) $(RESOURCES) $(RES_DRAWABLE) $(RES_DRAWABLE_LDPI) $(RES_DRAWABLE_MDPI) $(RES_DRAWABLE_HDPI) $(PP_RES_XML) res/values/defaults.xml res/drawable/sync_icon.png res/drawable/icon.png res/drawable-hdpi/icon.png res/values/strings.xml AndroidManifest.xml FORCE $(AAPT) package -f -M AndroidManifest.xml -I $(ANDROID_SDK)/android.jar -S res -J . --custom-package org.mozilla.gecko -gecko.ap_: AndroidManifest.xml res/drawable/sync_icon.png res/drawable/icon.png res/drawable-hdpi/icon.png $(RESOURCES) $(RES_DRAWABLE) $(PP_RES_XML) res/values/defaults.xml res/values/strings.xml FORCE +gecko.ap_: AndroidManifest.xml res/drawable/sync_icon.png res/drawable/icon.png res/drawable-hdpi/icon.png $(RESOURCES) $(RES_DRAWABLE) $(RES_DRAWABLE_LDPI) $(RES_DRAWABLE_MDPI) $(RES_DRAWABLE_HDPI) $(PP_RES_XML) res/values/defaults.xml res/values/strings.xml FORCE $(AAPT) package -f -M AndroidManifest.xml -I $(ANDROID_SDK)/android.jar -S res -F $@ libs:: classes.dex package-name.txt diff --git a/mobile/android/sync/android-drawable-hdpi-resources.mn b/mobile/android/sync/android-drawable-hdpi-resources.mn new file mode 100644 index 00000000000..cf01e8fb387 --- /dev/null +++ b/mobile/android/sync/android-drawable-hdpi-resources.mn @@ -0,0 +1 @@ +mobile/android/base/resources/drawable-hdpi/sync_ic_launcher.png diff --git a/mobile/android/sync/android-drawable-ldpi-resources.mn b/mobile/android/sync/android-drawable-ldpi-resources.mn new file mode 100644 index 00000000000..d5b09e1d957 --- /dev/null +++ b/mobile/android/sync/android-drawable-ldpi-resources.mn @@ -0,0 +1 @@ +mobile/android/base/resources/drawable-ldpi/sync_ic_launcher.png diff --git a/mobile/android/sync/android-drawable-mdpi-resources.mn b/mobile/android/sync/android-drawable-mdpi-resources.mn new file mode 100644 index 00000000000..b754ef13f2f --- /dev/null +++ b/mobile/android/sync/android-drawable-mdpi-resources.mn @@ -0,0 +1 @@ +mobile/android/base/resources/drawable-mdpi/sync_ic_launcher.png diff --git a/mobile/android/sync/android-drawable-resources.mn b/mobile/android/sync/android-drawable-resources.mn index 12aca1e147a..23afb00a990 100644 --- a/mobile/android/sync/android-drawable-resources.mn +++ b/mobile/android/sync/android-drawable-resources.mn @@ -1,4 +1 @@ mobile/android/base/resources/drawable/sync_icon.png -mobile/android/base/resources/drawable-hdpi/sync_ic_launcher.png -mobile/android/base/resources/drawable-ldpi/sync_ic_launcher.png -mobile/android/base/resources/drawable-mdpi/sync_ic_launcher.png