Merge "Prevent overridden APEX from being installed even when flattened"
am: 0ed107d542
Change-Id: I1c2267c01c28d796596deccdff840b8e599e00c0
This commit is contained in:
@@ -151,9 +151,19 @@ func (a *apexBundle) androidMkForFiles(w io.Writer, apexName, moduleDir string)
|
|||||||
fmt.Fprintln(w, "include $(BUILD_SYSTEM)/soong_cc_prebuilt.mk")
|
fmt.Fprintln(w, "include $(BUILD_SYSTEM)/soong_cc_prebuilt.mk")
|
||||||
} else {
|
} else {
|
||||||
fmt.Fprintln(w, "LOCAL_MODULE_STEM :=", fi.builtFile.Base())
|
fmt.Fprintln(w, "LOCAL_MODULE_STEM :=", fi.builtFile.Base())
|
||||||
// For flattened apexes, compat symlinks are attached to apex_manifest.json which is guaranteed for every apex
|
if a.primaryApexType && fi.builtFile == a.manifestPbOut {
|
||||||
if a.primaryApexType && fi.builtFile == a.manifestPbOut && len(a.compatSymlinks) > 0 {
|
// Make apex_manifest.pb module for this APEX to override all other
|
||||||
fmt.Fprintln(w, "LOCAL_POST_INSTALL_CMD :=", strings.Join(a.compatSymlinks, " && "))
|
// modules in the APEXes being overridden by this APEX
|
||||||
|
var patterns []string
|
||||||
|
for _, o := range a.overridableProperties.Overrides {
|
||||||
|
patterns = append(patterns, "%."+o+a.suffix)
|
||||||
|
}
|
||||||
|
fmt.Fprintln(w, "LOCAL_OVERRIDES_MODULES :=", strings.Join(patterns, " "))
|
||||||
|
|
||||||
|
if len(a.compatSymlinks) > 0 {
|
||||||
|
// For flattened apexes, compat symlinks are attached to apex_manifest.json which is guaranteed for every apex
|
||||||
|
fmt.Fprintln(w, "LOCAL_POST_INSTALL_CMD :=", strings.Join(a.compatSymlinks, " && "))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fmt.Fprintln(w, "include $(BUILD_PREBUILT)")
|
fmt.Fprintln(w, "include $(BUILD_PREBUILT)")
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user