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/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    TeleServiceTests's source depends on its classes and because of
    these changes they are no longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in TeleServiceTests
    results in duplicate classes which leads to build time and compile
    time issues.

Bug: 30188076
Test: make checkbuild
Change-Id: I37363db0af4d0d4152ecadbbd13f10e8d4cf72ef
diff --git a/tests/Android.mk b/tests/Android.mk
index b43533f..15de9b0 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -25,7 +25,7 @@
 
 LOCAL_MODULE_TAGS := tests
 
-LOCAL_JAVA_LIBRARIES := telephony-common android-support-test
+LOCAL_JAVA_LIBRARIES := telephony-common android-support-test android.test.base
 
 LOCAL_INSTRUMENTATION_FOR := TeleService
 
@@ -33,8 +33,7 @@
         android-support-test \
         mockito-target-minus-junit4 \
         espresso-core \
-        truth-prebuilt \
-        legacy-android-test
+        truth-prebuilt
 
 LOCAL_COMPATIBILITY_SUITE := device-tests