Keep the emma classes if emma is enabled.
Change-Id: Ie551d48532c61bf610b12875dc33cfe476625c5e
diff --git a/core/java.mk b/core/java.mk
index 9e47dc3..0fccbd3 100644
--- a/core/java.mk
+++ b/core/java.mk
@@ -322,6 +322,9 @@
-include $(BUILD_SYSTEM)/proguard.flags \
-forceprocessing \
-printmapping $(proguard_dictionary)
+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
diff --git a/core/proguard.emma.flags b/core/proguard.emma.flags
new file mode 100644
index 0000000..bf94086
--- /dev/null
+++ b/core/proguard.emma.flags
@@ -0,0 +1,4 @@
+# Keep everything for the emma classes
+-keep class com.vladium.** {
+ *;
+}