Remove comments in service_contexts
Commit b554e59 converted the build rules of contexts to Soong.
Previously, both services_contexts and hwservice_contexts were stripped
of comments. This is useful as a CTS test (testAospServiceContexts)
ensures that the device service_contexts matches AOSP. Restore the
previous behaviour.
Bug: 279384270
Test: m selinux_policy; diff plat_service_contexts; no more comments
Change-Id: Id0245efacf4e4b123f805869d95bacf804ccb915
diff --git a/build/soong/selinux_contexts.go b/build/soong/selinux_contexts.go
index 6a971da..7faafc6 100644
--- a/build/soong/selinux_contexts.go
+++ b/build/soong/selinux_contexts.go
@@ -333,7 +333,7 @@
return m
}
-func (m *selinuxContextsModule) buildHwServiceContexts(ctx android.ModuleContext, inputs android.Paths) android.Path {
+func (m *selinuxContextsModule) buildServiceContexts(ctx android.ModuleContext, inputs android.Paths) android.Path {
if m.properties.Remove_comment == nil {
m.properties.Remove_comment = proptools.BoolPtr(true)
}
@@ -478,7 +478,7 @@
func hwServiceFactory() android.Module {
m := newModule()
- m.build = m.buildHwServiceContexts
+ m.build = m.buildServiceContexts
return m
}
@@ -491,7 +491,7 @@
func serviceFactory() android.Module {
m := newModule()
- m.build = m.buildGeneralContexts
+ m.build = m.buildServiceContexts
return m
}