Fix build breakage due to broken CTS dependencies.
CtsVerifier depended on a static library that was built directly
against the platform, but it depended on the SDK.
This meant that proguard would complain about references in the
static library that were hidden from the SDK (arraycopy(float[]...)
in this case.
This is unsafe in general, but safe in the specific case where
the SDK stubs are generated from the platform that the static library
builds against.
This change compiles CtsVerifier against the platform to fix the build
as a short term workaround.
Change-Id: I646a406ea08c45a1eb3c47ba09118f8f85e30d8d
diff --git a/apps/CtsVerifier/Android.mk b/apps/CtsVerifier/Android.mk
index 397b39a..c227665a 100644
--- a/apps/CtsVerifier/Android.mk
+++ b/apps/CtsVerifier/Android.mk
@@ -32,7 +32,15 @@
LOCAL_PROGUARD_FLAG_FILES := proguard.flags
-LOCAL_SDK_VERSION := current
+# This can't be built against LOCAL_SDK_VERSION := current because
+# it depends on a static library that's built directly against the
+# platform.
+#
+# uncomment when b/13281332 is fixed
+# please also uncomment the equivalent code in
+# cts/tests/tests/hardware/Android.mk
+#
+# LOCAL_SDK_VERSION := current
LOCAL_DEX_PREOPT := false
diff --git a/tests/tests/hardware/Android.mk b/tests/tests/hardware/Android.mk
index 110b291..12c2b77 100644
--- a/tests/tests/hardware/Android.mk
+++ b/tests/tests/hardware/Android.mk
@@ -21,6 +21,12 @@
LOCAL_MODULE := cts-sensors-tests
LOCAL_MODULE_TAGS := tests
+# uncomment when b/13281332 is fixed
+# please also uncomment the equivalent code in
+# cts/apps/CtsVerifiers/Android.mk
+#
+# LOCAL_SDK_VERSION := current
+
LOCAL_SRC_FILES := $(call all-java-files-under, src/android/hardware/cts/helpers)
include $(BUILD_STATIC_JAVA_LIBRARY)
@@ -41,7 +47,10 @@
LOCAL_INSTRUMENTATION_FOR := CtsTestStubs
# uncomment when b/13281332 is fixed
-#LOCAL_SDK_VERSION := current
+# please also uncomment the equivalent code in
+# cts/apps/CtsVerifiers/Android.mk
+#
+# LOCAL_SDK_VERSION := current
LOCAL_JAVA_LIBRARIES := android.test.runner
include $(BUILD_CTS_PACKAGE)