aboutsummaryrefslogtreecommitdiffstats
path: root/android/paths.go
diff options
context:
space:
mode:
Diffstat (limited to 'android/paths.go')
-rw-r--r--android/paths.go19
1 files changed, 15 insertions, 4 deletions
diff --git a/android/paths.go b/android/paths.go
index aa06127f..b5b47304 100644
--- a/android/paths.go
+++ b/android/paths.go
@@ -39,6 +39,17 @@ type PathGlobContext interface {
var _ PathContext = blueprint.SingletonContext(nil)
var _ PathContext = blueprint.ModuleContext(nil)
+type ModuleInstallPathContext interface {
+ PathContext
+
+ androidBaseContext
+
+ InstallInData() bool
+ InstallInSanitizerDir() bool
+}
+
+var _ ModuleInstallPathContext = ModuleContext(nil)
+
// errorfContext is the interface containing the Errorf method matching the
// Errorf method in blueprint.SingletonContext.
type errorfContext interface {
@@ -669,14 +680,14 @@ func PathForModuleRes(ctx ModuleContext, pathComponents ...string) ModuleResPath
// PathForModuleInstall returns a Path representing the install path for the
// module appended with paths...
-func PathForModuleInstall(ctx ModuleContext, pathComponents ...string) OutputPath {
+func PathForModuleInstall(ctx ModuleInstallPathContext, pathComponents ...string) OutputPath {
var outPaths []string
if ctx.Device() {
var partition string
- if ctx.Vendor() {
- partition = ctx.DeviceConfig().VendorPath()
- } else if ctx.InstallInData() {
+ if ctx.InstallInData() {
partition = "data"
+ } else if ctx.Vendor() {
+ partition = ctx.DeviceConfig().VendorPath()
} else {
partition = "system"
}