Add system_ext_specific
The system_ext partition was created. So if java_sdk_library module is installed to system_ext partition, .xml and .jar install path must be changed to system_ext. Bug: 143440787 Test: add system_ext_specific to java_sdk_module && make -j && check system_ext parition Change-Id: Ie0d0df426d4aa96ac89eb4215e7376eea3f03f54
This commit is contained in:
@@ -293,6 +293,8 @@ func (module *SdkLibrary) implPath() string {
|
|||||||
partition = "odm"
|
partition = "odm"
|
||||||
} else if module.ProductSpecific() {
|
} else if module.ProductSpecific() {
|
||||||
partition = "product"
|
partition = "product"
|
||||||
|
} else if module.SystemExtSpecific() {
|
||||||
|
partition = "system_ext"
|
||||||
}
|
}
|
||||||
return "/" + partition + "/framework/" + module.implName() + ".jar"
|
return "/" + partition + "/framework/" + module.implName() + ".jar"
|
||||||
}
|
}
|
||||||
@@ -363,17 +365,18 @@ func (module *SdkLibrary) latestRemovedApiFilegroupName(apiScope apiScope) strin
|
|||||||
// Creates a static java library that has API stubs
|
// Creates a static java library that has API stubs
|
||||||
func (module *SdkLibrary) createStubsLibrary(mctx android.LoadHookContext, apiScope apiScope) {
|
func (module *SdkLibrary) createStubsLibrary(mctx android.LoadHookContext, apiScope apiScope) {
|
||||||
props := struct {
|
props := struct {
|
||||||
Name *string
|
Name *string
|
||||||
Srcs []string
|
Srcs []string
|
||||||
Sdk_version *string
|
Sdk_version *string
|
||||||
Libs []string
|
Libs []string
|
||||||
Soc_specific *bool
|
Soc_specific *bool
|
||||||
Device_specific *bool
|
Device_specific *bool
|
||||||
Product_specific *bool
|
Product_specific *bool
|
||||||
Compile_dex *bool
|
System_ext_specific *bool
|
||||||
System_modules *string
|
Compile_dex *bool
|
||||||
Java_version *string
|
System_modules *string
|
||||||
Product_variables struct {
|
Java_version *string
|
||||||
|
Product_variables struct {
|
||||||
Unbundled_build struct {
|
Unbundled_build struct {
|
||||||
Enabled *bool
|
Enabled *bool
|
||||||
}
|
}
|
||||||
@@ -417,6 +420,8 @@ func (module *SdkLibrary) createStubsLibrary(mctx android.LoadHookContext, apiSc
|
|||||||
props.Device_specific = proptools.BoolPtr(true)
|
props.Device_specific = proptools.BoolPtr(true)
|
||||||
} else if module.ProductSpecific() {
|
} else if module.ProductSpecific() {
|
||||||
props.Product_specific = proptools.BoolPtr(true)
|
props.Product_specific = proptools.BoolPtr(true)
|
||||||
|
} else if module.SystemExtSpecific() {
|
||||||
|
props.System_ext_specific = proptools.BoolPtr(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
mctx.CreateModule(LibraryFactory, &props)
|
mctx.CreateModule(LibraryFactory, &props)
|
||||||
@@ -561,12 +566,13 @@ func (module *SdkLibrary) createXmlFile(mctx android.LoadHookContext) {
|
|||||||
// creates a prebuilt_etc module to actually place the xml file under
|
// creates a prebuilt_etc module to actually place the xml file under
|
||||||
// <partition>/etc/permissions
|
// <partition>/etc/permissions
|
||||||
etcProps := struct {
|
etcProps := struct {
|
||||||
Name *string
|
Name *string
|
||||||
Src *string
|
Src *string
|
||||||
Sub_dir *string
|
Sub_dir *string
|
||||||
Soc_specific *bool
|
Soc_specific *bool
|
||||||
Device_specific *bool
|
Device_specific *bool
|
||||||
Product_specific *bool
|
Product_specific *bool
|
||||||
|
System_ext_specific *bool
|
||||||
}{}
|
}{}
|
||||||
etcProps.Name = proptools.StringPtr(module.xmlFileName())
|
etcProps.Name = proptools.StringPtr(module.xmlFileName())
|
||||||
etcProps.Src = proptools.StringPtr(":" + module.xmlFileName() + "-gen")
|
etcProps.Src = proptools.StringPtr(":" + module.xmlFileName() + "-gen")
|
||||||
@@ -577,6 +583,8 @@ func (module *SdkLibrary) createXmlFile(mctx android.LoadHookContext) {
|
|||||||
etcProps.Device_specific = proptools.BoolPtr(true)
|
etcProps.Device_specific = proptools.BoolPtr(true)
|
||||||
} else if module.ProductSpecific() {
|
} else if module.ProductSpecific() {
|
||||||
etcProps.Product_specific = proptools.BoolPtr(true)
|
etcProps.Product_specific = proptools.BoolPtr(true)
|
||||||
|
} else if module.SystemExtSpecific() {
|
||||||
|
etcProps.System_ext_specific = proptools.BoolPtr(true)
|
||||||
}
|
}
|
||||||
mctx.CreateModule(android.PrebuiltEtcFactory, &etcProps)
|
mctx.CreateModule(android.PrebuiltEtcFactory, &etcProps)
|
||||||
}
|
}
|
||||||
@@ -795,10 +803,11 @@ func (module *sdkLibraryImport) Name() string {
|
|||||||
func (module *sdkLibraryImport) createInternalModules(mctx android.LoadHookContext) {
|
func (module *sdkLibraryImport) createInternalModules(mctx android.LoadHookContext) {
|
||||||
// Creates a java import for the jar with ".stubs" suffix
|
// Creates a java import for the jar with ".stubs" suffix
|
||||||
props := struct {
|
props := struct {
|
||||||
Name *string
|
Name *string
|
||||||
Soc_specific *bool
|
Soc_specific *bool
|
||||||
Device_specific *bool
|
Device_specific *bool
|
||||||
Product_specific *bool
|
Product_specific *bool
|
||||||
|
System_ext_specific *bool
|
||||||
}{}
|
}{}
|
||||||
|
|
||||||
props.Name = proptools.StringPtr(module.BaseModuleName() + sdkStubsLibrarySuffix)
|
props.Name = proptools.StringPtr(module.BaseModuleName() + sdkStubsLibrarySuffix)
|
||||||
@@ -809,6 +818,8 @@ func (module *sdkLibraryImport) createInternalModules(mctx android.LoadHookConte
|
|||||||
props.Device_specific = proptools.BoolPtr(true)
|
props.Device_specific = proptools.BoolPtr(true)
|
||||||
} else if module.ProductSpecific() {
|
} else if module.ProductSpecific() {
|
||||||
props.Product_specific = proptools.BoolPtr(true)
|
props.Product_specific = proptools.BoolPtr(true)
|
||||||
|
} else if module.SystemExtSpecific() {
|
||||||
|
props.System_ext_specific = proptools.BoolPtr(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
mctx.CreateModule(ImportFactory, &props, &module.properties)
|
mctx.CreateModule(ImportFactory, &props, &module.properties)
|
||||||
|
Reference in New Issue
Block a user