Made ManifestPath OptionalPath instead of Path
because it is actually an optional value. Bug: 158843648 Test: m nothing Change-Id: If323eacf6a7aa83dcf5ce4825ad8cabeeaa97ac9
This commit is contained in:
parent
bec4d038bb
commit
33a3a8182f
|
@ -115,7 +115,7 @@ type ModuleConfig struct {
|
|||
DexLocation string // dex location on device
|
||||
BuildPath android.OutputPath
|
||||
DexPath android.Path
|
||||
ManifestPath android.Path
|
||||
ManifestPath android.OptionalPath
|
||||
UncompressedDex bool
|
||||
HasApkLibraries bool
|
||||
PreoptFlags []string
|
||||
|
@ -291,7 +291,7 @@ func ParseModuleConfig(ctx android.PathContext, data []byte) (*ModuleConfig, err
|
|||
// Construct paths that require a PathContext.
|
||||
config.ModuleConfig.BuildPath = constructPath(ctx, config.BuildPath).(android.OutputPath)
|
||||
config.ModuleConfig.DexPath = constructPath(ctx, config.DexPath)
|
||||
config.ModuleConfig.ManifestPath = constructPath(ctx, config.ManifestPath)
|
||||
config.ModuleConfig.ManifestPath = android.OptionalPathForPath(constructPath(ctx, config.ManifestPath))
|
||||
config.ModuleConfig.ProfileClassListing = android.OptionalPathForPath(constructPath(ctx, config.ProfileClassListing))
|
||||
config.ModuleConfig.EnforceUsesLibrariesStatusFile = constructPath(ctx, config.EnforceUsesLibrariesStatusFile)
|
||||
config.ModuleConfig.ClassLoaderContexts = fromJsonClassLoaderContext(ctx, config.ClassLoaderContexts)
|
||||
|
|
|
@ -276,9 +276,9 @@ func dexpreoptCommand(ctx android.PathContext, globalSoong *GlobalSoongConfig, g
|
|||
// no time/space is wasted on AOT-compiling modules that will fail CLC check on device.
|
||||
|
||||
var manifestOrApk android.Path
|
||||
if module.ManifestPath != nil {
|
||||
if module.ManifestPath.Valid() {
|
||||
// Ok, there is an XML manifest.
|
||||
manifestOrApk = module.ManifestPath
|
||||
manifestOrApk = module.ManifestPath.Path()
|
||||
} else if filepath.Ext(base) == ".apk" {
|
||||
// Ok, there is is an APK with the manifest inside.
|
||||
manifestOrApk = module.DexPath
|
||||
|
|
|
@ -221,7 +221,7 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Wr
|
|||
DexLocation: dexLocation,
|
||||
BuildPath: android.PathForModuleOut(ctx, "dexpreopt", ctx.ModuleName()+".jar").OutputPath,
|
||||
DexPath: dexJarFile,
|
||||
ManifestPath: d.manifestFile,
|
||||
ManifestPath: android.OptionalPathForPath(d.manifestFile),
|
||||
UncompressedDex: d.uncompressedDex,
|
||||
HasApkLibraries: false,
|
||||
PreoptFlags: nil,
|
||||
|
|
Loading…
Reference in New Issue