Add ramdisk image.
It is similar to recovery image.
Test: m nothing -j
Change-Id: I11389777c6bfb0c0d73bbb4c70091c1e70f44077
diff --git a/android/module.go b/android/module.go
index 05115d6..2662e2a 100644
--- a/android/module.go
+++ b/android/module.go
@@ -167,6 +167,7 @@
InstallInData() bool
InstallInTestcases() bool
InstallInSanitizerDir() bool
+ InstallInRamdisk() bool
InstallInRecovery() bool
InstallInRoot() bool
InstallBypassMake() bool
@@ -207,6 +208,7 @@
InstallInData() bool
InstallInTestcases() bool
InstallInSanitizerDir() bool
+ InstallInRamdisk() bool
InstallInRecovery() bool
InstallInRoot() bool
InstallBypassMake() bool
@@ -384,6 +386,9 @@
// Whether this module is installed to recovery partition
Recovery *bool
+ // Whether this module is installed to ramdisk
+ Ramdisk *bool
+
// Whether this module is built for non-native architecures (also known as native bridge binary)
Native_bridge_supported *bool `android:"arch_variant"`
@@ -867,6 +872,10 @@
return false
}
+func (m *ModuleBase) InstallInRamdisk() bool {
+ return Bool(m.commonProperties.Ramdisk)
+}
+
func (m *ModuleBase) InstallInRecovery() bool {
return Bool(m.commonProperties.Recovery)
}
@@ -898,6 +907,10 @@
}
}
+func (m *ModuleBase) InRamdisk() bool {
+ return m.base().commonProperties.ImageVariation == RamdiskVariation
+}
+
func (m *ModuleBase) InRecovery() bool {
return m.base().commonProperties.ImageVariation == RecoveryVariation
}
@@ -1649,6 +1662,10 @@
return m.module.InstallInSanitizerDir()
}
+func (m *moduleContext) InstallInRamdisk() bool {
+ return m.module.InstallInRamdisk()
+}
+
func (m *moduleContext) InstallInRecovery() bool {
return m.module.InstallInRecovery()
}