android.test.base/runner/mock libraries are shared libraries that are
built without SDK, but with framework interanl libraries (framework.jar,
etc). Apps or libs that are built with SDK (LOCAL_SDK_VERSION is set)
shouldn't use them, but instead the stubs version of the test framework
libraries, which are built using SDK.
This is because, the build system does not allow a module built with SDK
to depend on another module built without SDK. This has been
exceptionally allowed with warnings, but will soon be errors.
In order to prevent the expected build breakage, direct reference to the
shared libraries are all changed to the stubs libraries.
Note: no one has been using these shared libs statically. So, it is
guaranteed that they won't encounter a problem due to missing
<uses-library name="android.test.runner"/> even after this change.
Bug: 69899800
Test: m -j checkbuild
Change-Id: I7f25e0127c52c56adf288163a760f3dc9aee6586
In preparation for the removal of the non-junit classes in the
android.test.base library from the android.jar this adds a dependency
on android.test.base/stubs to ensure this code will continue to
compile.
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.
* samples/ApiDemos/tests/Android.mk
Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
ApiDemosTests's will need them in order to compile once its classes
are removed from the current SDK on which it currently depends.
* samples/BrokenKeyDerivation/tests/Android.mk
Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
BrokenKeyDerivationTests's will need them in order to compile once
its classes are removed from the current SDK on which it currently
depends.
* samples/HelloActivity/tests/Android.mk
Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
HelloActivityTests's will need them in order to compile once its
classes are removed from the current SDK on which it currently
depends.
* samples/LunarLander/tests/Android.mk
Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
LunarLanderTests's will need them in order to compile once its
classes are removed from the current SDK on which it currently
depends.
* samples/SkeletonApp/tests/Android.mk
Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
SkeletonAppTests's will need them in order to compile once its
classes are removed from the current SDK on which it currently
depends.
* samples/Snake/tests/Android.mk
Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
SnakeTests's will need them in order to compile once its classes
are removed from the current SDK on which it currently depends.
* samples/Vault/Android.mk
Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
Vault's will need them in order to compile once its classes are
removed from the current SDK on which it currently depends.
Bug: 30188076
Test: make dist
Change-Id: Id7fb558504706668a85bf840529f6cd075499d6a
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.
* samples/ApiDemos/tests/Android.mk
Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
because statically including the classes in ApiDemosTests results
in duplicate classes which leads to build time and compile time
issues.
* samples/BrokenKeyDerivation/tests/Android.mk
Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
because statically including the classes in
BrokenKeyDerivationTests results in duplicate classes which leads
to build time and compile time issues.
* samples/HelloActivity/tests/Android.mk
Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
because statically including the classes in HelloActivityTests
results in duplicate classes which leads to build time and compile
time issues.
* samples/LunarLander/tests/Android.mk
Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
because statically including the classes in LunarLanderTests
results in duplicate classes which leads to build time and compile
time issues.
* samples/SkeletonApp/tests/Android.mk
Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
because statically including the classes in SkeletonAppTests
results in duplicate classes which leads to build time and compile
time issues.
* samples/Snake/tests/Android.mk
Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
because statically including the classes in SnakeTests results in
duplicate classes which leads to build time and compile time
issues.
* samples/Vault/Android.mk
Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
because statically including the classes in Vault results in
duplicate classes which leads to build time and compile time
issues.
Added 'android.test.runner.stubs' to LOCAL_JAVA_LIBRARIES because
Vault's source depends on its classes and because of these changes
they are no longer present on the compilation path.
* samples/Vault/AndroidManifest.xml
Add uses-library for android.test.runner because otherwise this
change would change the set of files available to Vault at runtime.
Bug: 30188076
Test: make checkbuild
Change-Id: I9f42f9216b7a40f1f139699e9c4df04325d577a1
In preparation for removing junit and android.test classes from
the Android API this change adds explicit dependencies on junit
and/or legacy-android-test to ensure that modules will compile
properly once it is removed.
Care was taken to ensure that any targets that depended,
directly or indirectly, on android-support-test did not also
depend on junit or hamcrest as they conflict with the versions
embedded within android-support-test.
Bug: 30188076
Test: make checkbuild
Change-Id: I03f7836a1081acda5ed2c6e43cb24e9dc23b944c
Add LOCAL_DEX_PREOPT := false to force the samples to build actual apks.
In addition, fix a couple of other small issues:
- TtsEngine didn't have the api level set properly.
- SimpleJNI used a non-ndk library and was using libc++.
Change-Id: I1fd7c187956eed4620049bb746f4d62babcd648a
2D canvas DrawVertex to create a vector graphic background
touch & keypad playable
landscape & portrait for all known device sizes. All measurements in DP and nicely scaling.
using xml drawables to rotate "dpad" arrow
Change-Id: I995acaaf0935c13c03fcbcf974ce5af06f46780e
Add new web pages for sample apps included in the SDK.
Revise the existing sample app web pages.
Delete screenshots for notepad and lunar lander (these have
moved into frameworks/base/docs/html/guide/samples/image/.