am 0ad622b4: add ellipsis for overflowing strings in samples nav
* commit '0ad622b4a6fcaa4232b543aba3e28ec982b50d08':
add ellipsis for overflowing strings in samples nav
diff --git a/core/Makefile b/core/Makefile
index 55ab6a5..299fbf8 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -1391,6 +1391,27 @@
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
diff --git a/core/base_rules.mk b/core/base_rules.mk
index 188c352..9415731 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -387,19 +387,20 @@
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 @@
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 @@
$(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 @@
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_JAR_MANIFEST :=
endif
-endif
+endif # PRIVATE java vars
###########################################################
diff --git a/core/binary.mk b/core/binary.mk
index 10d4927..e695567 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -141,21 +141,17 @@
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)
diff --git a/core/clear_vars.mk b/core/clear_vars.mk
index 8d84814..90a99ac 100644
--- a/core/clear_vars.mk
+++ b/core/clear_vars.mk
@@ -102,7 +102,7 @@
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:=
diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk
index 371ba96..e3e6841 100644
--- a/core/combo/TARGET_linux-arm.mk
+++ b/core/combo/TARGET_linux-arm.mk
@@ -93,6 +93,8 @@
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 @@
-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
diff --git a/core/combo/TARGET_linux-mips.mk b/core/combo/TARGET_linux-mips.mk
index 83fe657..73ed203 100644
--- a/core/combo/TARGET_linux-mips.mk
+++ b/core/combo/TARGET_linux-mips.mk
@@ -80,6 +80,8 @@
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 @@
-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
diff --git a/core/combo/TARGET_linux-x86.mk b/core/combo/TARGET_linux-x86.mk
index 04531b2..a4abcff 100644
--- a/core/combo/TARGET_linux-x86.mk
+++ b/core/combo/TARGET_linux-x86.mk
@@ -85,6 +85,8 @@
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 @@
-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 += \
diff --git a/core/definitions.mk b/core/definitions.mk
index 7834baa..43fdc40 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -1716,35 +1716,6 @@
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 @@
###########################################################
## 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 @@
###########################################################
## Define device-specific radio files
###########################################################
+INSTALLED_RADIOIMAGE_TARGET :=
# Copy a radio image file to the output location, and add it to
# INSTALLED_RADIOIMAGE_TARGET.
diff --git a/core/java.mk b/core/java.mk
index f43bf3b..a2d41ad 100644
--- a/core/java.mk
+++ b/core/java.mk
@@ -88,7 +88,6 @@
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 @@
$(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
+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
-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
+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.
diff --git a/core/main.mk b/core/main.mk
index 6a077e4..3af4306 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -547,10 +547,20 @@
$(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 @@
$(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 @@
$(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) \
diff --git a/core/proguard.flags b/core/proguard.flags
index 1e3951b..0641627 100644
--- a/core/proguard.flags
+++ b/core/proguard.flags
@@ -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
diff --git a/core/proguard_basic_keeps.flags b/core/proguard_basic_keeps.flags
index 0ce81ef..af0e05d 100644
--- a/core/proguard_basic_keeps.flags
+++ b/core/proguard_basic_keeps.flags
@@ -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
diff --git a/core/proguard_tests.flags b/core/proguard_tests.flags
index f4063d6..4481a1b 100644
--- a/core/proguard_tests.flags
+++ b/core/proguard_tests.flags
@@ -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*();
diff --git a/target/product/core.mk b/target/product/core.mk
index 0e7aad6..93667fb 100644
--- a/target/product/core.mk
+++ b/target/product/core.mk
@@ -36,7 +36,6 @@
TelephonyProvider \
UserDictionaryProvider \
VpnDialogs \
- abcc \
atrace \
libandroidfw \
libaudiopreprocessing \
diff --git a/target/product/mini.mk b/target/product/mini.mk
index 751b481..67ef4fd 100644
--- a/target/product/mini.mk
+++ b/target/product/mini.mk
@@ -64,7 +64,6 @@
Shell \
TelephonyProvider \
UserDictionaryProvider \
- abcc \
apache-xml \
audio \
bouncycastle \