summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Paul Duffin <paulduffin@google.com> 2020-05-29 09:50:20 +0100
committer Anton Hansson <hansson@google.com> 2021-02-01 11:26:55 +0000
commit09159170d770f2c8b53ea18030c4b5528b7d953b (patch)
tree5b93b63e0773bd4eceb81b3e8d9a4e8b702ba6c5
parentdd124428cace8696d2b9939a9027ffaeeddb2474 (diff)
Prevent default use of framework module implementation
Prevent dependencies that do not specify an sdk_version from accessing the implementation library of a framework module by default and force them to use stubs instead. Bug: 155164730 Test: m nothing Merged-In: Ib60e538a4017857eefa3465e56745c00306887e1 Change-Id: Ib60e538a4017857eefa3465e56745c00306887e1
-rw-r--r--apex/Android.bp4
1 files changed, 4 insertions, 0 deletions
diff --git a/apex/Android.bp b/apex/Android.bp
index 04d6e0abc310..4de76c8fe441 100644
--- a/apex/Android.bp
+++ b/apex/Android.bp
@@ -84,6 +84,10 @@ java_defaults {
// entry.
shared_library: false,
+ // Prevent dependencies that do not specify an sdk_version from accessing the
+ // implementation library by default and force them to use stubs instead.
+ default_to_stubs: true,
+
// Enable api lint. This will eventually become the default for java_sdk_library
// but it cannot yet be turned on because some usages have not been cleaned up.
// TODO(b/156126315) - Remove when no longer needed.