diff options
author | Paul Duffin <paulduffin@google.com> | 2021-02-12 10:28:28 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2021-02-12 10:28:28 +0000 |
commit | c66769ddd96b88cb129733e03b585b0d9c3bed15 (patch) | |
tree | cbb703292e8b39af6c8867704fd6239f58873fb4 /java/java.go | |
parent | da68a045a384d21ce6fd849915e0c0866e12811b (diff) | |
parent | f75e527c2b65bf94252188f5d032eadae68a8492 (diff) |
Merge changes I831da5fa,I866916c9
* changes:
Move logic for selecting the primary module into initHiddenAPI()
Ensure that <x>-hiddenapi modules are included in hiddenapi-index.csv
Diffstat (limited to 'java/java.go')
-rw-r--r-- | java/java.go | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/java/java.go b/java/java.go index 8cf4ee5bb..4c6009b43 100644 --- a/java/java.go +++ b/java/java.go @@ -1798,14 +1798,8 @@ func (j *Module) compile(ctx android.ModuleContext, aaptSrcJar android.Path) { return } - configurationName := j.ConfigurationName() - primary := configurationName == ctx.ModuleName() - // If the prebuilt is being used rather than the from source, skip this - // module to prevent duplicated classes - primary = primary && !j.IsReplacedByPrebuilt() - // Hidden API CSV generation and dex encoding - dexOutputFile = j.hiddenAPIExtractAndEncode(ctx, configurationName, primary, dexOutputFile, j.implementationJarFile, + dexOutputFile = j.hiddenAPIExtractAndEncode(ctx, dexOutputFile, j.implementationJarFile, proptools.Bool(j.dexProperties.Uncompress_dex)) // merge dex jar with resources if necessary @@ -2917,9 +2911,6 @@ func (j *Import) GenerateAndroidBuildActions(ctx android.ModuleContext) { j.exportAidlIncludeDirs = android.PathsForModuleSrc(ctx, j.properties.Aidl.Export_include_dirs) if ctx.Device() { - configurationName := j.BaseModuleName() - primary := j.Prebuilt().UsePrebuilt() - // If this is a variant created for a prebuilt_apex then use the dex implementation jar // obtained from the associated deapexer module. ai := ctx.Provider(android.ApexInfoProvider).(android.ApexInfo) @@ -2935,7 +2926,7 @@ func (j *Import) GenerateAndroidBuildActions(ctx android.ModuleContext) { di := ctx.OtherModuleProvider(deapexerModule, android.DeapexerProvider).(android.DeapexerInfo) if dexOutputPath := di.PrebuiltExportPath(j.BaseModuleName(), ".dexjar"); dexOutputPath != nil { j.dexJarFile = dexOutputPath - j.hiddenAPI.hiddenAPIExtractInformation(ctx, dexOutputPath, outputFile, primary) + j.hiddenAPIExtractInformation(ctx, dexOutputPath, outputFile) } else { // This should never happen as a variant for a prebuilt_apex is only created if the // prebuilt_apex has been configured to export the java library dex file. @@ -2967,7 +2958,7 @@ func (j *Import) GenerateAndroidBuildActions(ctx android.ModuleContext) { } // Hidden API CSV generation and dex encoding - dexOutputFile = j.hiddenAPIExtractAndEncode(ctx, configurationName, primary, dexOutputFile, outputFile, + dexOutputFile = j.hiddenAPIExtractAndEncode(ctx, dexOutputFile, outputFile, proptools.Bool(j.dexProperties.Uncompress_dex)) j.dexJarFile = dexOutputFile |