apex_set is force disabled when necessary
prebuilt_apex has been disabled when the device is configured for
flattened APEXes, sanitized, instrumented, or built unbundled. However,
apex_set which is another type of APEX prebuilt wasn't disabled for the
same conditions.
This change fixes the discripency. apex_set modules are also force
disabled when the prebuilts are not expected.
Bug: 161316762
Bug: 160933444
Test: OVERRIDE_TARGET_FLATTEN_APEX=true m
The built image has only the flattened APEXes and the device boots
Change-Id: I6c90dfb28d565861a473a1bdce93269ec370601d
diff --git a/apex/apex.go b/apex/apex.go
index b29017d..045ae82 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -2112,7 +2112,7 @@
case android.PrebuiltDepTag:
// If the prebuilt is force disabled, remember to delete the prebuilt file
// that might have been installed in the previous builds
- if prebuilt, ok := child.(*Prebuilt); ok && prebuilt.isForceDisabled() {
+ if prebuilt, ok := child.(prebuilt); ok && prebuilt.isForceDisabled() {
a.prebuiltFileToDelete = prebuilt.InstallFilename()
}
}