OSDN Git Service

am 2552239a: fix most of size problems of DAC on handsets. set device-width for viewp...
authorScott Main <smain@google.com>
Wed, 11 Sep 2013 17:09:47 +0000 (10:09 -0700)
committerAndroid Git Automerger <android-git-automerger@android.com>
Wed, 11 Sep 2013 17:09:47 +0000 (10:09 -0700)
* commit '2552239a522963429f494ff89a4be6d3831fb1fb':
  fix most of size problems of DAC on handsets. set device-width for viewport tag

15 files changed:
core/Makefile
core/base_rules.mk
core/binary.mk
core/clear_vars.mk
core/combo/TARGET_linux-arm.mk
core/combo/TARGET_linux-mips.mk
core/combo/TARGET_linux-x86.mk
core/definitions.mk
core/java.mk
core/main.mk
core/proguard.flags
core/proguard_basic_keeps.flags
core/proguard_tests.flags
target/product/core.mk
target/product/mini.mk

index 55ab6a5..299fbf8 100644 (file)
@@ -1391,6 +1391,27 @@ $(EMMA_META_ZIP) :
 
 endif # EMMA_INSTRUMENT=true
 
+#------------------------------------------------------------------
+# A zip of Proguard obfuscation dictionary files.
+# Only for apps_only build.
+#
+ifdef TARGET_BUILD_APPS
+PROGUARD_DICT_ZIP := $(PRODUCT_OUT)/$(TARGET_PRODUCT)-proguard-dict-$(FILE_NAME_TAG).zip
+# the dependency will be set up later in build/core/main.mk.
+$(PROGUARD_DICT_ZIP) :
+       @echo "Packaging Proguard obfuscation dictionary files."
+       $(hide) dict_files=`find $(TARGET_OUT_COMMON_INTERMEDIATES)/APPS -name proguard_dictionary`; \
+               if [ -n "$$dict_files" ]; then \
+                 zip -q $@ $$dict_files; \
+               else \
+                 touch $(dir $@)/dummy; \
+                 (cd $(dir $@) && zip -q $(notdir $@) dummy); \
+                 zip -qd $@ dummy; \
+                 rm $(dir $@)/dummy; \
+               fi
+
+endif # TARGET_BUILD_APPS
+
 # -----------------------------------------------------------------
 # dalvik something
 .PHONY: dalvikfiles
index 188c352..9415731 100644 (file)
@@ -387,19 +387,20 @@ ifdef LOCAL_IS_HOST_MODULE
 ifeq ($(LOCAL_BUILD_HOST_DEX),true)
 $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH := -bootclasspath $(call java-lib-files,core-hostdex,$(LOCAL_IS_HOST_MODULE))
 
-full_java_libs := $(call java-lib-files,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))
+full_shared_java_libs := $(call java-lib-files,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))
 full_java_lib_deps := $(call java-lib-deps,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))
 else
 $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH :=
 
-full_java_libs := $(addprefix $(HOST_OUT_JAVA_LIBRARIES)/,$(addsuffix $(COMMON_JAVA_PACKAGE_SUFFIX),$(LOCAL_JAVA_LIBRARIES)))
-full_java_lib_deps := $(full_java_libs)
+full_shared_java_libs := $(addprefix $(HOST_OUT_JAVA_LIBRARIES)/,\
+    $(addsuffix $(COMMON_JAVA_PACKAGE_SUFFIX),$(LOCAL_JAVA_LIBRARIES)))
+full_java_lib_deps := $(full_shared_java_libs)
 endif # LOCAL_BUILD_HOST_DEX
 else
-full_java_libs := $(call java-lib-files,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))
+full_shared_java_libs := $(call java-lib-files,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))
 full_java_lib_deps := $(call java-lib-deps,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))
 endif # !LOCAL_IS_HOST_MODULE
-full_java_libs += $(full_static_java_libs) $(LOCAL_CLASSPATH)
+full_java_libs := $(full_shared_java_libs) $(full_static_java_libs) $(LOCAL_CLASSPATH)
 full_java_lib_deps += $(full_static_java_libs) $(LOCAL_CLASSPATH)
 
 # This is set by packages that are linking to other packages that export
@@ -412,6 +413,7 @@ ifdef LOCAL_APK_LIBRARIES
               APPS,$(lib),,COMMON)/classes.jar)
 
   # link against the jar with full original names (before proguard processing).
+  full_shared_java_libs += $(link_apk_libraries)
   full_java_libs += $(link_apk_libraries)
   full_java_lib_deps += $(link_apk_libraries)
 endif
@@ -426,14 +428,12 @@ ifdef LOCAL_INSTRUMENTATION_FOR
         $(LOCAL_PATH): Multiple LOCAL_INSTRUMENTATION_FOR members defined)
   endif
 
-  link_instr_intermediates_dir := $(call intermediates-dir-for, \
-      APPS,$(LOCAL_INSTRUMENTATION_FOR))
   link_instr_intermediates_dir.COMMON := $(call intermediates-dir-for, \
       APPS,$(LOCAL_INSTRUMENTATION_FOR),,COMMON)
-
   # link against the jar with full original names (before proguard processing).
-  full_java_libs += $(link_instr_intermediates_dir.COMMON)/classes.jar
-  full_java_lib_deps += $(link_instr_intermediates_dir.COMMON)/classes.jar
+  link_instr_classes_jar := $(link_instr_intermediates_dir.COMMON)/classes.jar
+  full_java_libs += $(link_instr_classes_jar)
+  full_java_lib_deps += $(link_instr_classes_jar)
 endif
 
 jar_manifest_file :=
@@ -444,7 +444,7 @@ else
 $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_JAR_MANIFEST :=
 endif
 
-endif
+endif  # PRIVATE java vars
 
 
 ###########################################################
index 10d4927..e695567 100644 (file)
@@ -141,21 +141,17 @@ LOCAL_ASFLAGS += -D__ASSEMBLY__
 ifdef LOCAL_SDK_VERSION
 my_target_project_includes :=
 my_target_c_includes := $(my_ndk_stl_include_path) $(my_ndk_version_root)/usr/include
-
-# filter out including of AndroidConfig.h in system/core.
-TARGET_GLOBAL_CFLAGS_NO_ANDCONF ?= $(subst $(TARGET_ANDROID_CONFIG_CFLAGS),,\
-    $(TARGET_GLOBAL_CFLAGS))
-my_target_global_cflags := $(TARGET_GLOBAL_CFLAGS_NO_ANDCONF)
 else
 my_target_project_includes := $(TARGET_PROJECT_INCLUDES)
 my_target_c_includes := $(TARGET_C_INCLUDES)
-ifeq ($(strip $(LOCAL_CLANG)),true)
-my_target_c_includes += $(CLANG_CONFIG_EXTRA_TARGET_C_INCLUDES)
+endif # LOCAL_SDK_VERSION
+
+ifeq ($(LOCAL_CLANG),true)
 my_target_global_cflags := $(TARGET_GLOBAL_CLANG_FLAGS)
+my_target_c_includes += $(CLANG_CONFIG_EXTRA_TARGET_C_INCLUDES)
 else
 my_target_global_cflags := $(TARGET_GLOBAL_CFLAGS)
 endif # LOCAL_CLANG
-endif # LOCAL_SDK_VERSION
 
 $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_PROJECT_INCLUDES := $(my_target_project_includes)
 $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_C_INCLUDES := $(my_target_c_includes)
index 8d84814..90a99ac 100644 (file)
@@ -102,7 +102,7 @@ LOCAL_SDK_VERSION:=
 LOCAL_SDK_RES_VERSION:=
 LOCAL_NDK_STL_VARIANT:=
 LOCAL_EMMA_INSTRUMENT:=
-LOCAL_PROGUARD_ENABLED:= # '',full,custom,nosystem,disabled
+LOCAL_PROGUARD_ENABLED:= # '',full,custom,nosystem,disabled,obfuscation,optimization
 LOCAL_PROGUARD_FLAGS:=
 LOCAL_PROGUARD_FLAG_FILES:=
 LOCAL_EMMA_COVERAGE_FILTER:=
index 371ba96..e3e6841 100644 (file)
@@ -93,6 +93,8 @@ ifeq ($(FORCE_ARM_DEBUGGING),true)
   TARGET_thumb_CFLAGS += -marm -fno-omit-frame-pointer
 endif
 
+android_config_h := $(call select-android-config-h,linux-arm)
+
 TARGET_GLOBAL_CFLAGS += \
                        -msoft-float -fpic -fPIE \
                        -ffunction-sections \
@@ -103,11 +105,9 @@ TARGET_GLOBAL_CFLAGS += \
                        -Werror=format-security \
                        -D_FORTIFY_SOURCE=1 \
                        -fno-short-enums \
-                       $(arch_variant_cflags)
-
-android_config_h := $(call select-android-config-h,linux-arm)
-TARGET_ANDROID_CONFIG_CFLAGS := -include $(android_config_h) -I $(dir $(android_config_h))
-TARGET_GLOBAL_CFLAGS += $(TARGET_ANDROID_CONFIG_CFLAGS)
+                       $(arch_variant_cflags) \
+                       -include $(android_config_h) \
+                       -I $(dir $(android_config_h))
 
 # This warning causes dalvik not to build with gcc 4.6+ and -Werror.
 # We cannot turn it off blindly since the option is not available
index 83fe657..73ed203 100644 (file)
@@ -80,6 +80,8 @@ ifeq ($(FORCE_MIPS_DEBUGGING),true)
   TARGET_mips_CFLAGS += -fno-omit-frame-pointer
 endif
 
+android_config_h := $(call select-android-config-h,linux-mips)
+
 TARGET_GLOBAL_CFLAGS += \
                        $(TARGET_mips_CFLAGS) \
                        -Ulinux -U__unix -U__unix__ -Umips \
@@ -90,11 +92,9 @@ TARGET_GLOBAL_CFLAGS += \
                        -Wa,--noexecstack \
                        -Werror=format-security \
                        -D_FORTIFY_SOURCE=1 \
-                       $(arch_variant_cflags)
-
-android_config_h := $(call select-android-config-h,linux-mips)
-TARGET_ANDROID_CONFIG_CFLAGS := -include $(android_config_h) -I $(dir $(android_config_h))
-TARGET_GLOBAL_CFLAGS += $(TARGET_ANDROID_CONFIG_CFLAGS)
+                       $(arch_variant_cflags) \
+                       -include $(android_config_h) \
+                       -I $(dir $(android_config_h))
 
 # This warning causes dalvik not to build with gcc 4.6+ and -Werror.
 # We cannot turn it off blindly since the option is not available
index 04531b2..a4abcff 100644 (file)
@@ -85,6 +85,8 @@ else
 endif
 KERNEL_HEADERS := $(KERNEL_HEADERS_COMMON) $(KERNEL_HEADERS_ARCH)
 
+android_config_h := $(call select-android-config-h,target_linux-x86)
+
 TARGET_GLOBAL_CFLAGS += \
                        -O2 \
                        -Ulinux \
@@ -101,11 +103,9 @@ TARGET_GLOBAL_CFLAGS += \
                        -fstrict-aliasing \
                        -funswitch-loops \
                        -funwind-tables \
-                       -fstack-protector
-
-android_config_h := $(call select-android-config-h,target_linux-x86)
-TARGET_ANDROID_CONFIG_CFLAGS := -include $(android_config_h) -I $(dir $(android_config_h))
-TARGET_GLOBAL_CFLAGS += $(TARGET_ANDROID_CONFIG_CFLAGS)
+                       -fstack-protector \
+                       -include $(android_config_h) \
+                       -I $(dir $(android_config_h))
 
 # XXX: Not sure this is still needed. Must check with our toolchains.
 TARGET_GLOBAL_CPPFLAGS += \
index 7834baa..43fdc40 100644 (file)
@@ -1716,35 +1716,6 @@ $(if $(PRIVATE_EXTRA_JAR_ARGS), $(call add-java-resources-to-package))
 endef
 
 ###########################################################
-## Obfuscate a jar file
-###########################################################
-
-# PRIVATE_KEEP_FILE is a file containing a list of classes
-# PRIVATE_INTERMEDIATES_DIR is a directory we can use for temporary files
-# The module using this must depend on
-#        $(HOST_OUT_JAVA_LIBRARIES)/proguard-4.0.1.jar
-define obfuscate-jar
-@echo "Obfuscate jar: $(notdir $@) ($@)"
-@mkdir -p $(dir $@)
-@rm -f $@
-@mkdir -p $(PRIVATE_INTERMEDIATES_DIR)
-$(hide) sed -e 's/^/-keep class /' < $(PRIVATE_KEEP_FILE) > \
-               $(PRIVATE_INTERMEDIATES_DIR)/keep.pro
-$(hide) java -Xmx512M -jar $(HOST_OUT_JAVA_LIBRARIES)/proguard-4.0.1.jar \
-               -injars $< \
-               -outjars $@ \
-               -target 1.5 \
-               -dontnote -dontwarn \
-               -printmapping $(PRIVATE_INTERMEDIATES_DIR)/out.map \
-               -forceprocessing \
-               -renamesourcefileattribute SourceFile \
-               -keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,*Annotation*,EnclosingMethod \
-               -repackageclasses \
-               -keepclassmembers "class * { public protected *; }" \
-               @$(PRIVATE_INTERMEDIATES_DIR)/keep.pro
-endef
-
-###########################################################
 ## Commands for copying files
 ###########################################################
 
@@ -1887,34 +1858,11 @@ endif
 ###########################################################
 ## Commands to call Proguard
 ###########################################################
-
-# Command to copy the file with acp, if proguard is disabled.
-define proguard-disabled-commands
-@echo Copying: $@
-$(hide) $(ACP) -fp $< $@
-endef
-
-# Command to call Proguard
-# $(1): extra flags for instrumentation.
-define proguard-enabled-commands
-@echo Proguard: $@
-$(hide) $(PROGUARD) -injars $< -outjars $@ $(PRIVATE_PROGUARD_FLAGS) $(1)
-endef
-
-# Figure out the proguard dictionary file of the module that is instrumentationed for.
-define get-instrumentation-proguard-flags
-$(if $(PRIVATE_INSTRUMENTATION_FOR),$(if $(ALL_MODULES.$(PRIVATE_INSTRUMENTATION_FOR).PROGUARD_ENABLED),-applymapping $(call intermediates-dir-for,APPS,$(PRIVATE_INSTRUMENTATION_FOR),,COMMON)/proguard_dictionary))
-endef
-
 define transform-jar-to-proguard
-$(eval _instrumentation_proguard_flags:=$(call get-instrumentation-proguard-flags))
-$(eval _enable_proguard:=$(PRIVATE_PROGUARD_ENABLED)$(_instrumentation_proguard_flags))
-$(if $(_enable_proguard),$(call proguard-enabled-commands,$(_instrumentation_proguard_flags)),$(call proguard-disabled-commands))
-$(eval _instrumentation_proguard_flags:=)
-$(eval _enable_proguard:=)
+@echo Proguard: $@
+$(hide) $(PROGUARD) -injars $< -outjars $@ $(PRIVATE_PROGUARD_FLAGS)
 endef
 
-
 ###########################################################
 ## Stuff source generated from one-off tools
 ###########################################################
@@ -1999,6 +1947,7 @@ endef
 ###########################################################
 ## Define device-specific radio files
 ###########################################################
+INSTALLED_RADIOIMAGE_TARGET :=
 
 # Copy a radio image file to the output location, and add it to
 # INSTALLED_RADIOIMAGE_TARGET.
index f43bf3b..a2d41ad 100644 (file)
@@ -88,7 +88,6 @@ full_classes_compiled_jar_leaf := classes-full-debug.jar
 built_dex_intermediate_leaf := classes-with-local.dex
 endif
 
-LOCAL_PROGUARD_ENABLED:=$(strip $(LOCAL_PROGUARD_ENABLED))
 ifeq ($(LOCAL_PROGUARD_ENABLED),disabled)
 LOCAL_PROGUARD_ENABLED :=
 endif
@@ -386,42 +385,75 @@ $(full_classes_jar): $(full_classes_emma_jar) | $(ACP)
        $(hide) $(ACP) -fp $< $@
 
 # Run proguard if necessary, otherwise just copy the file.
+ifdef LOCAL_PROGUARD_ENABLED
+ifneq ($(filter-out full custom nosystem obfuscation optimization,$(LOCAL_PROGUARD_ENABLED)),)
+    $(warning while processing: $(LOCAL_MODULE))
+    $(error invalid value for LOCAL_PROGUARD_ENABLED: $(LOCAL_PROGUARD_ENABLED))
+endif
 proguard_dictionary := $(intermediates.COMMON)/proguard_dictionary
-# Proguard doesn't like a class in both library and the jar to be processed.
-proguard_full_java_libs := $(filter-out $(full_static_java_libs),$(full_java_libs))
-proguard_flags := $(addprefix -libraryjars ,$(proguard_full_java_libs)) \
+proguard_flags := $(addprefix -libraryjars ,$(full_shared_java_libs)) \
                   -forceprocessing \
                   -printmapping $(proguard_dictionary)
-ifneq ($(LOCAL_PROGUARD_ENABLED),nosystem)
+
+ifeq ($(filter nosystem,$(LOCAL_PROGUARD_ENABLED)),)
 proguard_flags += -include $(BUILD_SYSTEM)/proguard.flags
 ifeq ($(LOCAL_EMMA_INSTRUMENT),true)
 proguard_flags += -include $(BUILD_SYSTEM)/proguard.emma.flags
 endif
 # If this is a test package, add proguard keep flags for tests.
-ifneq ($(strip $(LOCAL_INSTRUMENTATION_FOR)$(filter tests,$(LOCAL_MODULE_TAGS))$(filter android.test.runner,$(LOCAL_JAVA_LIBRARIES))),)
-proguard_flags := $(proguard_flags) -include $(BUILD_SYSTEM)/proguard_tests.flags
+ifneq ($(LOCAL_INSTRUMENTATION_FOR)$(filter tests,$(LOCAL_MODULE_TAGS)),)
+proguard_flags += -include $(BUILD_SYSTEM)/proguard_tests.flags
 endif # test package
-else  # LOCAL_PROGUARD_ENABLED is nosystem
-proguard_flags += -include $(BUILD_SYSTEM)/proguard_basic_keeps.flags
-endif # LOCAL_PROGUARD_ENABLED is not nosystem
-
-ifneq ($(LOCAL_PROGUARD_ENABLED),)
-ifeq ($(filter full custom nosystem, $(LOCAL_PROGUARD_ENABLED)),)
-    $(warning while processing: $(LOCAL_MODULE))
-    $(error invalid value for LOCAL_PROGUARD_ENABLED: $(LOCAL_PROGUARD_ENABLED))
-endif # not a legal value
-endif # LOCAL_PROGUARD_ENABLED
+ifeq ($(filter obfuscation,$(LOCAL_PROGUARD_ENABLED)),)
+# By default no obfuscation
+proguard_flags += -dontobfuscate
+endif  # No obfuscation
+ifeq ($(filter optimization,$(LOCAL_PROGUARD_ENABLED)),)
+# By default no optimization
+proguard_flags += -dontoptimize
+endif  # No optimization
+
+ifdef LOCAL_INSTRUMENTATION_FOR
+ifeq ($(filter obfuscation,$(LOCAL_PROGUARD_ENABLED)),)
+# If no obfuscation, link in the instrmented package's classes.jar as a library.
+# link_instr_classes_jar is defined in base_rule.mk
+proguard_flags += -libraryjars $(link_instr_classes_jar)
+else # obfuscation
+# If obfuscation is enabled, the main app must be obfuscated too.
+# We need to run obfuscation using the main app's dictionary,
+# and treat the main app's class.jar as injars instead of libraryjars.
+proguard_flags := -injars  $(link_instr_classes_jar) \
+    -outjars $(intermediates.COMMON)/proguard.$(LOCAL_INSTRUMENTATION_FOR).jar \
+    -include $(link_instr_intermediates_dir.COMMON)/proguard_options \
+    -applymapping $(link_instr_intermediates_dir.COMMON)/proguard_dictionary \
+    -verbose \
+    $(proguard_flags)
+
+# Sometimes (test + main app) uses different keep rules from the main app -
+# apply the main app's dictionary anyway.
+proguard_flags += -ignorewarnings
+
+# Make sure we run Proguard on the main app first
+$(full_classes_proguard_jar) : $(link_instr_intermediates_dir.COMMON)/proguard.classes.jar
+
+endif # no obfuscation
+endif # LOCAL_INSTRUMENTATION_FOR
+endif  # LOCAL_PROGUARD_ENABLED is not nosystem
 
 proguard_flag_files := $(addprefix $(LOCAL_PATH)/, $(LOCAL_PROGUARD_FLAG_FILES))
 LOCAL_PROGUARD_FLAGS += $(addprefix -include , $(proguard_flag_files))
 
-$(full_classes_proguard_jar): PRIVATE_PROGUARD_ENABLED:=$(LOCAL_PROGUARD_ENABLED)
 $(full_classes_proguard_jar): PRIVATE_PROGUARD_FLAGS := $(proguard_flags) $(LOCAL_PROGUARD_FLAGS)
-$(full_classes_proguard_jar): PRIVATE_INSTRUMENTATION_FOR:=$(strip $(LOCAL_INSTRUMENTATION_FOR))
 $(full_classes_proguard_jar) : $(full_classes_jar) $(proguard_flag_files) | $(ACP) $(PROGUARD)
        $(call transform-jar-to-proguard)
 
-ALL_MODULES.$(LOCAL_MODULE).PROGUARD_ENABLED:=$(LOCAL_PROGUARD_ENABLED)
+else  # LOCAL_PROGUARD_ENABLED not defined
+$(full_classes_proguard_jar) : $(full_classes_jar)
+       @echo Copying: $@
+       $(hide) $(ACP) -fp $< $@
+
+endif # LOCAL_PROGUARD_ENABLED defined
+
 
 # Override PRIVATE_INTERMEDIATES_DIR so that install-dex-debug
 # will work even when intermediates != intermediates.COMMON.
index 6a077e4..3af4306 100644 (file)
@@ -547,10 +547,20 @@ $(foreach m,$(ALL_MODULES), \
   $(eval r := $(ALL_MODULES.$(m).REQUIRED)) \
   $(if $(r), \
     $(eval r := $(call module-installed-files,$(r))) \
-    $(eval $(call add-required-deps,$(ALL_MODULES.$(m).INSTALLED),$(r))) \
+    $(eval t_m := $(filter $(TARGET_OUT_ROOT)/%, $(ALL_MODULES.$(m).INSTALLED))) \
+    $(eval h_m := $(filter $(HOST_OUT_ROOT)/%, $(ALL_MODULES.$(m).INSTALLED))) \
+    $(eval t_r := $(filter $(TARGET_OUT_ROOT)/%, $(r))) \
+    $(eval h_r := $(filter $(HOST_OUT_ROOT)/%, $(r))) \
+    $(if $(t_m), $(eval $(call add-required-deps, $(t_m),$(t_r)))) \
+    $(if $(h_m), $(eval $(call add-required-deps, $(h_m),$(h_r)))) \
    ) \
  )
 
+t_m :=
+h_m :=
+t_r :=
+h_r :=
+
 # Resolve the dependencies on shared libraries.
 $(foreach m,$(TARGET_DEPENDENCIES_ON_SHARED_LIBRARIES), \
   $(eval p := $(subst :,$(space),$(m))) \
@@ -809,6 +819,9 @@ ifneq ($(TARGET_BUILD_APPS),)
     $(call dist-for-goals,apps_only, $(EMMA_META_ZIP))
   endif
 
+  $(PROGUARD_DICT_ZIP) : $(apps_only_installed_files)
+  $(call dist-for-goals,apps_only, $(PROGUARD_DICT_ZIP))
+
 .PHONY: apps_only
 apps_only: $(unbundled_build_modules)
 
@@ -828,6 +841,10 @@ else # TARGET_BUILD_APPS
     $(INSTALLED_FACTORY_BUNDLE_TARGET) \
    )
 
+  # Put a copy of the radio/bootloader files in the dist dir.
+  $(foreach f,$(INSTALLED_RADIOIMAGE_TARGET), \
+    $(call dist-for-goals, droidcore, $(f)))
+
   ifneq ($(TARGET_BUILD_PDK),true)
     $(call dist-for-goals, droidcore, \
       $(APPS_ZIP) \
index 1e3951b..0641627 100644 (file)
@@ -1,9 +1,10 @@
+# We have moved -dontobfuscate and -dontoptimize to the makefiles.
 # dex does not like code run through proguard optimize and preverify steps.
--dontoptimize
+-dontoptimize
 -dontpreverify
 
 # Don't obfuscate. We only need dead code striping.
--dontobfuscate
+-dontobfuscate
 
 # Add this flag in your package's own configuration if it's needed.
 #-flattenpackagehierarchy
index 0ce81ef..af0e05d 100644 (file)
@@ -1,7 +1,6 @@
 # see http://sourceforge.net/tracker/?func=detail&aid=2787465&group_id=54750&atid=474707
 -optimizations !code/simplification/arithmetic
 -optimizations !code/simplification/cast
--allowaccessmodification
 
 # To prevent name conflict in incremental obfuscation.
 -useuniqueclassmembernames
index f4063d6..4481a1b 100644 (file)
@@ -1,5 +1,9 @@
 # Keep everything for tests
--dontshrink -dontobfuscate
+-dontshrink
+
+# But we may want to obfuscate if the main app gets obfuscated.
+# This flag has been moved to the makefiles.
+#-dontobfuscate
 
 #-keep class * extends junit.framework.TestCase {
 #  public void test*();
index 0e7aad6..93667fb 100644 (file)
@@ -36,7 +36,6 @@ PRODUCT_PACKAGES += \
     TelephonyProvider \
     UserDictionaryProvider \
     VpnDialogs \
-    abcc \
     atrace \
     libandroidfw \
     libaudiopreprocessing \
index 751b481..67ef4fd 100644 (file)
@@ -64,7 +64,6 @@ PRODUCT_PACKAGES += \
     Shell \
     TelephonyProvider \
     UserDictionaryProvider \
-    abcc \
     apache-xml \
     audio \
     bouncycastle \