Merge changes I3d6506f5,I3667eac9

am: 9dc1756484

Change-Id: I5da90cdf8c36b3d3cdad2c9f3077465087dda545
This commit is contained in:
Jaewoong Jung
2019-10-01 10:09:16 -07:00
committed by android-build-merger
5 changed files with 39 additions and 11 deletions

View File

@@ -154,6 +154,7 @@ type ModuleContext interface {
CheckbuildFile(srcPath Path)
InstallInData() bool
InstallInTestcases() bool
InstallInSanitizerDir() bool
InstallInRecovery() bool
InstallBypassMake() bool
@@ -192,6 +193,7 @@ type Module interface {
Enabled() bool
Target() Target
InstallInData() bool
InstallInTestcases() bool
InstallInSanitizerDir() bool
InstallInRecovery() bool
InstallBypassMake() bool
@@ -832,6 +834,10 @@ func (m *ModuleBase) InstallInData() bool {
return false
}
func (m *ModuleBase) InstallInTestcases() bool {
return false
}
func (m *ModuleBase) InstallInSanitizerDir() bool {
return false
}
@@ -1504,6 +1510,10 @@ func (m *moduleContext) InstallInData() bool {
return m.module.InstallInData()
}
func (m *moduleContext) InstallInTestcases() bool {
return m.module.InstallInTestcases()
}
func (m *moduleContext) InstallInSanitizerDir() bool {
return m.module.InstallInSanitizerDir()
}

View File

@@ -44,6 +44,7 @@ type ModuleInstallPathContext interface {
BaseModuleContext
InstallInData() bool
InstallInTestcases() bool
InstallInSanitizerDir() bool
InstallInRecovery() bool
InstallBypassMake() bool
@@ -1155,6 +1156,8 @@ func modulePartition(ctx ModuleInstallPathContext) string {
var partition string
if ctx.InstallInData() {
partition = "data"
} else if ctx.InstallInTestcases() {
partition = "testcases"
} else if ctx.InstallInRecovery() {
// the layout of recovery partion is the same as that of system partition
partition = "recovery/root/system"

View File

@@ -201,6 +201,7 @@ type moduleInstallPathContextImpl struct {
baseModuleContext
inData bool
inTestcases bool
inSanitizerDir bool
inRecovery bool
}
@@ -219,6 +220,10 @@ func (m moduleInstallPathContextImpl) InstallInData() bool {
return m.inData
}
func (m moduleInstallPathContextImpl) InstallInTestcases() bool {
return m.inTestcases
}
func (m moduleInstallPathContextImpl) InstallInSanitizerDir() bool {
return m.inSanitizerDir
}