From 57a23d2f207598571468b582c20bb9eac91b62c2 Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Wed, 4 Apr 2018 15:42:19 -0700 Subject: [PATCH] Add vintf_fragments. Bug: 66917623 Test: fragments are loaded in the right place Test: boot device which is depending on fragments Test: androidmk file which uses LOCAL_VINTF_FRAGMENTS properly converted Change-Id: I366b731cf8d5ecf51851866f441ff1c517da75cf --- android/androidmk.go | 3 +++ android/module.go | 3 +++ androidmk/cmd/androidmk/android.go | 1 + 3 files changed, 7 insertions(+) diff --git a/android/androidmk.go b/android/androidmk.go index 0ea75643b..ebed05fd6 100644 --- a/android/androidmk.go +++ b/android/androidmk.go @@ -227,6 +227,9 @@ func translateAndroidMkModule(ctx SingletonContext, w io.Writer, mod blueprint.M if len(amod.commonProperties.Init_rc) > 0 { fmt.Fprintln(&data.preamble, "LOCAL_INIT_RC := ", strings.Join(amod.commonProperties.Init_rc, " ")) } + if len(amod.commonProperties.Vintf_fragments) > 0 { + fmt.Fprintln(&data.preamble, "LOCAL_VINTF_FRAGMENTS := ", strings.Join(amod.commonProperties.Vintf_fragments, " ")) + } if Bool(amod.commonProperties.Proprietary) { fmt.Fprintln(&data.preamble, "LOCAL_PROPRIETARY_MODULE := true") } diff --git a/android/module.go b/android/module.go index 1e5447006..a011f5717 100644 --- a/android/module.go +++ b/android/module.go @@ -242,6 +242,9 @@ type commonProperties struct { // init.rc files to be installed if this module is installed Init_rc []string + // VINTF manifest fragments to be installed if this module is installed + Vintf_fragments []string + // names of other modules to install if this module is installed Required []string `android:"arch_variant"` diff --git a/androidmk/cmd/androidmk/android.go b/androidmk/cmd/androidmk/android.go index b2a8914e9..a578bcfdc 100644 --- a/androidmk/cmd/androidmk/android.go +++ b/androidmk/cmd/androidmk/android.go @@ -121,6 +121,7 @@ func init() { "LOCAL_EXPORT_SHARED_LIBRARY_HEADERS": "export_shared_lib_headers", "LOCAL_EXPORT_STATIC_LIBRARY_HEADERS": "export_static_lib_headers", "LOCAL_INIT_RC": "init_rc", + "LOCAL_VINTF_FRAGMENTS": "vintf_fragments", "LOCAL_TIDY_FLAGS": "tidy_flags", // TODO: This is comma-separated, not space-separated "LOCAL_TIDY_CHECKS": "tidy_checks",