Move MediaStore.java inside APEX boundary.

Recent work has paved the way to get MediaStore.java building against
"core_platform", and this change is actually shifting MediaStore.java
inside the MediaProvider APEX boundary.

This involves defining a new "updatable-mediaprovider" library JAR
and ensuring that it's spliced into classpaths where needed to keep
everything building and working.

Note that the MediaProvider APK itself is still bundled, so we're
manually including the MediaStore.java when building that APK so that
we can continue referencing @hide symbols, but there's a STOPSHIP
comment to remove that once we get the APK building against
"system_current".

Bug: 144247087
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: I74d16cd14889650e1dc21855766e4d2f579b5030
diff --git a/apex/framework/Android.bp b/apex/framework/Android.bp
new file mode 100644
index 0000000..be2c55d
--- /dev/null
+++ b/apex/framework/Android.bp
@@ -0,0 +1,66 @@
+// Copyright (C) 2019 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+java_library {
+    name: "framework-mediaprovider",
+
+    srcs: [
+        ":framework-mediaprovider-sources",
+    ],
+
+    permitted_packages: [
+        "android.provider",
+    ],
+
+    installable: true,
+
+    sdk_version: "core_platform",
+    libs: [
+        // The order matters. android_system_* library should come later.
+        "framework_mediaprovider_annotation",
+        "android_system_stubs_current",
+    ],
+
+    plugins: ["java_api_finder"],
+}
+
+filegroup {
+    name: "framework-mediaprovider-sources",
+    srcs: [
+        "java/**/*.java",
+    ],
+    path: "java",
+}
+
+droidstubs {
+    name: "framework-mediaprovider-stubs",
+    srcs: [
+        ":framework-mediaprovider-sources",
+        ":framework-mediaprovider-annotation-sources",
+    ],
+    defaults: [ "framework-module-stubs-defaults-systemapi" ],
+    sdk_version: "system_current",
+}
+
+java_library {
+    name: "framework_mediaprovider_stubs",
+    srcs: [":framework-mediaprovider-stubs"],
+    sdk_version: "system_current",
+}
+
+java_library {
+    name: "framework_mediaprovider_annotation",
+    srcs: [":framework-mediaprovider-annotation-sources"],
+    installable: false,
+}