Limit build visibility of modules in apex/...
This changes the default visibility of soong modules in this directory
to __subpackages__, from the current public default.
This helps accidental dependencies sneaking in without intent from
the module owner.
Bug: 175604587
Test: m nothing
Change-Id: I1df8b8e087d27f62ce8c09d7e6e32d511efdba6b
diff --git a/apex/media/Android.bp b/apex/media/Android.bp
new file mode 100644
index 0000000..5f1bd37
--- /dev/null
+++ b/apex/media/Android.bp
@@ -0,0 +1,20 @@
+// Copyright (C) 2020 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.
+package {
+ default_visibility: [
+ ":__subpackages__",
+ "//frameworks/av/apex",
+ "//frameworks/av/apex/testing",
+ ],
+}
diff --git a/apex/media/framework/Android.bp b/apex/media/framework/Android.bp
index b3c9a9a..811a700 100644
--- a/apex/media/framework/Android.bp
+++ b/apex/media/framework/Android.bp
@@ -48,6 +48,10 @@
"test_com.android.media",
],
min_sdk_version: "29",
+ visibility: [
+ "//frameworks/av/apex:__subpackages__",
+ "//frameworks/base", // For framework-all
+ ],
}
filegroup {
@@ -58,6 +62,7 @@
":mediaparser-srcs",
":mediasession2-java-srcs",
],
+ visibility: ["//frameworks/base"],
}
filegroup {