Prepare for removal of legacy-test from default targets

In preparation for removing junit classes from the Android API
the legacy-test target will be removed from the
TARGET_DEFAULT_JAVA_LIBRARIES. This change adds explicit
dependencies on junit and/or legacy-android-test to ensure that
modules will compile properly once it is removed.

(cherry picked from b7099adc38fd3760f96721e9b3a768e4a5068c97)

Bug: 30188076
Test: make checkbuild
Merged-In: I1cc80298ffd6402b91227d45f86fd958d589da50
Change-Id: If1c1df5f5132f2d90d3fd932f28425fec505c6d5
1 file changed