Propagate owners info in filesystem provider
Owners contain information about the name and the variants of the
modules that are installed in the partition. This information can be
used to determine whether the dependency module is installed or not.
Utilization of this information will be done in a follow up change.
Test: m nothing
Bug: 395989947
Change-Id: I8c63ed5765a3f582ff0d2ce98f63e6e0fc6edad8
diff --git a/android/module_context.go b/android/module_context.go
index f279fd9..fb62e67 100644
--- a/android/module_context.go
+++ b/android/module_context.go
@@ -655,6 +655,7 @@
owner: owner,
requiresFullInstall: requiresFullInstall,
fullInstallPath: fullInstallPath,
+ variation: m.ModuleSubDir(),
}
m.packagingSpecs = append(m.packagingSpecs, spec)
return spec
@@ -806,6 +807,7 @@
owner: owner,
requiresFullInstall: m.requiresFullInstall(),
fullInstallPath: fullInstallPath,
+ variation: m.ModuleSubDir(),
})
return fullInstallPath
@@ -856,6 +858,7 @@
owner: owner,
requiresFullInstall: m.requiresFullInstall(),
fullInstallPath: fullInstallPath,
+ variation: m.ModuleSubDir(),
})
return fullInstallPath
diff --git a/android/packaging.go b/android/packaging.go
index 551fd4c..73cc7c7 100644
--- a/android/packaging.go
+++ b/android/packaging.go
@@ -72,6 +72,9 @@
// tools that want to interact with these files outside of the build. You should not use it
// inside of the build. Will be nil if this module doesn't require a "full install".
fullInstallPath InstallPath
+
+ // String representation of the variation of the module where this packaging spec is output of
+ variation string
}
type packagingSpecGob struct {
@@ -86,6 +89,15 @@
ArchType ArchType
Overrides []string
Owner string
+ Variation string
+}
+
+func (p *PackagingSpec) Owner() string {
+ return p.owner
+}
+
+func (p *PackagingSpec) Variation() string {
+ return p.variation
}
func (p *PackagingSpec) ToGob() *packagingSpecGob {
@@ -101,6 +113,7 @@
ArchType: p.archType,
Overrides: p.overrides.ToSlice(),
Owner: p.owner,
+ Variation: p.variation,
}
}
@@ -116,6 +129,7 @@
p.archType = data.ArchType
p.overrides = uniquelist.Make(data.Overrides)
p.owner = data.Owner
+ p.variation = data.Variation
}
func (p *PackagingSpec) GobEncode() ([]byte, error) {