aboutsummaryrefslogtreecommitdiffstats
path: root/android
diff options
context:
space:
mode:
authorJaewoong Jung <jungjw@google.com>2019-04-26 14:31:50 -0700
committerMichael Bestas <mkbestas@lineageos.org>2019-12-11 19:03:32 +0200
commitedd7f298986d42f6ed22defe42ea790a3ba5c5c1 (patch)
treef20a6fad6d9426d06b92935e75c0035d4a588fcd /android
parent61732d653e590a6159ae8d7650a59c68c3426c28 (diff)
downloadbuild_soong-edd7f298986d42f6ed22defe42ea790a3ba5c5c1.tar.gz
build_soong-edd7f298986d42f6ed22defe42ea790a3ba5c5c1.tar.bz2
build_soong-edd7f298986d42f6ed22defe42ea790a3ba5c5c1.zip
Implement DPI variants in android_app_import.
Bug: 128610294 Test: app_test.go Change-Id: Ie3e558bfdb40de6b0b9df95d3b373d08a4084d7b
Diffstat (limited to 'android')
-rw-r--r--android/prebuilt.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/android/prebuilt.go b/android/prebuilt.go
index 3be10f72..3d9804ce 100644
--- a/android/prebuilt.go
+++ b/android/prebuilt.go
@@ -50,6 +50,11 @@ func (p *Prebuilt) Name(name string) string {
return "prebuilt_" + name
}
+// 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
+// preference configs. We'll want to add native support for dynamic source cases if we end up having
+// more modules like this.
func (p *Prebuilt) SingleSourcePath(ctx ModuleContext) Path {
if p.srcs != nil {
if len(*p.srcs) == 0 {