Use prebuilt android.test.base.jar for app builds

Bug: 30188076
Test: make checkbuild
Change-Id: I1d7e705baf5728e7a034f3bd32746de3a1d3cd78
diff --git a/test-base/Android.mk b/test-base/Android.mk
index 6a1ac9e..03bdcf23 100644
--- a/test-base/Android.mk
+++ b/test-base/Android.mk
@@ -60,6 +60,9 @@
 
 include $(BUILD_STATIC_JAVA_LIBRARY)
 
+# For unbundled build we'll use the prebuilt jar from prebuilts/sdk.
+ifeq (,$(TARGET_BUILD_APPS)$(filter true,$(TARGET_BUILD_PDK)))
+
 # Generate the stub source files for android.test.base.stubs
 # ==========================================================
 include $(CLEAR_VARS)
@@ -151,6 +154,8 @@
 	@echo Copying removed.txt
 	$(hide) $(ACP) $(ANDROID_TEST_BASE_OUTPUT_REMOVED_API_FILE) $(ANDROID_TEST_BASE_REMOVED_API_FILE)
 
+endif  # not TARGET_BUILD_APPS not TARGET_BUILD_PDK=true
+
 # Build the legacy-android-test library
 # =====================================
 # This contains the android.test classes that were in Android API level 25,