packages/providers/TvProvider: Set LOCAL_SDK_VERSION where possible.

This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.

Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.

Test: make relevant packages
Bug: 73535841
Change-Id: Iff01ae2febabaea5cc00b932a897ff5226c132be
Merged-In: Id1a9d74938633527cda8ca9cd24bb83161661953
diff --git a/Android.mk b/Android.mk
index 6cb2e03..588aa49 100644
--- a/Android.mk
+++ b/Android.mk
@@ -21,6 +21,7 @@
 LOCAL_SRC_FILES := $(call all-java-files-under, src)
 
 LOCAL_PACKAGE_NAME := TvProvider
+LOCAL_PRIVATE_PLATFORM_APIS := true
 LOCAL_PRIVILEGED_MODULE := true
 
 include $(BUILD_PACKAGE)
diff --git a/tests/Android.mk b/tests/Android.mk
index 450a0b2..3c415e6 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -21,8 +21,9 @@
 LOCAL_SRC_FILES := $(call all-java-files-under, src)
 
 LOCAL_PACKAGE_NAME := TvProviderTests
-LOCAL_JAVA_LIBRARIES := android.test.runner
-LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test
+LOCAL_PRIVATE_PLATFORM_APIS := true
+LOCAL_JAVA_LIBRARIES := android.test.runner android.test.base android.test.mock
+LOCAL_STATIC_JAVA_LIBRARIES := junit
 LOCAL_INSTRUMENTATION_FOR := TvProvider
 
 include $(BUILD_PACKAGE)