java_sdk_library_import: Propagate prefer to child modules
Bug: 155164730
Test: m nothing
Change-Id: Idb06d79baf346ac570beada79880814c5ef6bb50
diff --git a/android/prebuilt.go b/android/prebuilt.go
index 82745a4..ee4a13a 100644
--- a/android/prebuilt.go
+++ b/android/prebuilt.go
@@ -69,6 +69,10 @@
p.properties.Prefer = proptools.BoolPtr(true)
}
+func (p *Prebuilt) Prefer() bool {
+ return proptools.Bool(p.properties.Prefer)
+}
+
// The below source-related functions and the srcs, src fields are based on an assumption that
// prebuilt modules have a static source property at the moment. Currently there is only one
// exception, android_app_import, which chooses a source file depending on the product's DPI