Platform shouldn't directly link to jars in APEXes

The non-updatable part of the platform shouldn't directly link to the
boot jars in APEXes. Ensure this by

1) setting the visibility property for the boot jars so that they are
not visible to non-APEX modules and
2) setting the apex_available property so that the boot jars are only
built for the corresponding APEXes, but not for others.

Bug: N/A
Test: m
Change-Id: Iae4e5d5092406b0bfffae428a64ae02b9972042a
diff --git a/apex/framework/Android.bp b/apex/framework/Android.bp
index 67c02ae..98ace89 100644
--- a/apex/framework/Android.bp
+++ b/apex/framework/Android.bp
@@ -33,6 +33,13 @@
     ],
 
     plugins: ["java_api_finder"],
+
+    hostdex: true, // for hiddenapi check
+    visibility: ["//packages/providers/MediaProvider/apex:__subpackages__"],
+    apex_available: [
+        "com.android.mediaprovider",
+        "test_com.android.mediaprovider",
+    ],
 }
 
 filegroup {