diff options
author | Paul Duffin <paulduffin@google.com> | 2017-12-11 20:39:33 +0000 |
---|---|---|
committer | Paul Duffin <paulduffin@google.com> | 2017-12-12 12:52:53 +0000 |
commit | 151e235f915537bf57ad3c2f0b6d8499a4cf65b1 (patch) | |
tree | 96fadd225ba0c1e892edbfaa0ae88f2705d3fc2f /tests/java_api | |
parent | 2cf6e7b0565921bdc1afacde7647fac14814f28e (diff) | |
download | rs-151e235f915537bf57ad3c2f0b6d8499a4cf65b1.tar.gz |
Stop statically including legacy-android-test
Statically including legacy-android-test leads to duplicate classes
which causes build time problems (with Proguard) and runtime problems on
older SDK versions. This change:
* Stops statically including legacy-android-test.
* Adds compile time dependencies on andoid.test.base, android.test.mock
and android.test.runner where necessary.
* Adds <uses-library android:name="android.test.runner"/> to any
affected package to ensure that the classes that were included by
legacy-android-test are still available at runtime. That also adds a
dependency on android.test.base and android.test.mock.
The following change descriptions were generated automatically and so
may be a little repetitive. They are provided to give the reviewer
enough information to check the comments match what has actually been
changed and check the reasoning behind the changes.
* tests/java_api/RSTest_CompatLibLegacy/Android.mk
Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
because statically including the classes in RSTest_CompatLegacy
results in duplicate classes which leads to build time and compile
time issues. It is also unnecessary as RSTest_CompatLegacy targets
SDK version 20 which provides all the classes at runtime.
* tests/java_api/RSTest_CompatLibLegacy/AndroidManifest.xml
Add uses-library for android.test.runner because otherwise this
change would change the set of files available to
RSTest_CompatLegacy at runtime.
Bug: 30188076
Test: make checkbuild
Change-Id: Ieb1a8f212b6a649a6fb5b8399460418e1a6d57d0
Diffstat (limited to 'tests/java_api')
-rw-r--r-- | tests/java_api/RSTest_CompatLibLegacy/Android.mk | 3 | ||||
-rw-r--r-- | tests/java_api/RSTest_CompatLibLegacy/AndroidManifest.xml | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/tests/java_api/RSTest_CompatLibLegacy/Android.mk b/tests/java_api/RSTest_CompatLibLegacy/Android.mk index d1fe0dba..ff841e7c 100644 --- a/tests/java_api/RSTest_CompatLibLegacy/Android.mk +++ b/tests/java_api/RSTest_CompatLibLegacy/Android.mk @@ -29,8 +29,7 @@ LOCAL_SRC_FILES := $(call all-java-files-under, src) $(call all-renderscript-fil LOCAL_PACKAGE_NAME := RSTest_CompatLegacy LOCAL_STATIC_JAVA_LIBRARIES := \ - android-support-v8-renderscript \ - legacy-android-test + android-support-v8-renderscript LOCAL_SDK_VERSION := 8 LOCAL_RENDERSCRIPT_TARGET_API := 18 diff --git a/tests/java_api/RSTest_CompatLibLegacy/AndroidManifest.xml b/tests/java_api/RSTest_CompatLibLegacy/AndroidManifest.xml index cd386c29..e36b7a80 100644 --- a/tests/java_api/RSTest_CompatLibLegacy/AndroidManifest.xml +++ b/tests/java_api/RSTest_CompatLibLegacy/AndroidManifest.xml @@ -6,6 +6,8 @@ <application android:label="_RS_Test_CompatLegacy" android:icon="@drawable/test_pattern"> + <uses-library android:name="android.test.runner" /> + <activity android:name="RSTestCompatLegacy" android:screenOrientation="portrait"> <intent-filter> |