Fix visibility issues with android.test.mock.stubs

This ensures that the API definitions for the android.test.mock package
matches the definitions in the api/current.txt file.

Bug: 30188076
Test: make update-api
Change-Id: Id325b8cf2f189117ac4cfe7634095ab710eee004
diff --git a/test-mock/Android.mk b/test-mock/Android.mk
index a761a07..04c242c 100644
--- a/test-mock/Android.mk
+++ b/test-mock/Android.mk
@@ -16,7 +16,12 @@
 
 LOCAL_PATH:= $(call my-dir)
 
-android_test_mock_source_files := $(call all-java-files-under, src/android/test/mock)
+# Includes the main framework source to ensure that doclava has access to the
+# visibility information for the base classes of the mock classes. Without it
+# otherwise hidden methods could be visible.
+android_test_mock_source_files := \
+    $(call all-java-files-under, src/android/test/mock) \
+    $(call all-java-files-under, ../core/java) \
 
 # For unbundled build we'll use the prebuilt jar from prebuilts/sdk.
 ifeq (,$(TARGET_BUILD_APPS)$(filter true,$(TARGET_BUILD_PDK)))
@@ -67,6 +72,8 @@
 LOCAL_ADDITIONAL_DEPENDENCIES := $(android_test_mock_gen_stamp)
 android_test_mock_gen_stamp :=
 
+LOCAL_SDK_VERSION := current
+
 include $(BUILD_STATIC_JAVA_LIBRARY)
 
 # Archive a copy of the classes.jar in SDK build.