diff options
Diffstat (limited to 'java/java.go')
-rw-r--r-- | java/java.go | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/java/java.go b/java/java.go index 515d20429..d4a52086e 100644 --- a/java/java.go +++ b/java/java.go @@ -481,9 +481,6 @@ func shouldUncompressDex(ctx android.ModuleContext, dexpreopter *dexpreopter) bo } func (j *Library) GenerateAndroidBuildActions(ctx android.ModuleContext) { - // Initialize the hiddenapi structure. - j.initHiddenAPI(ctx) - j.sdkVersion = j.SdkVersion(ctx) j.minSdkVersion = j.MinSdkVersion(ctx) @@ -1239,9 +1236,6 @@ func (j *Import) GenerateAndroidBuildActions(ctx android.ModuleContext) { j.sdkVersion = j.SdkVersion(ctx) j.minSdkVersion = j.MinSdkVersion(ctx) - // Initialize the hiddenapi structure. - j.initHiddenAPI(ctx) - if !ctx.Provider(android.ApexInfoProvider).(android.ApexInfo).IsForPlatform() { j.hideApexVariantFromMake = true } @@ -1313,7 +1307,9 @@ 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.hiddenAPIUpdatePaths(ctx, dexOutputPath, outputFile) + + // Initialize the hiddenapi structure. + j.initHiddenAPI(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. @@ -1344,8 +1340,8 @@ func (j *Import) GenerateAndroidBuildActions(ctx android.ModuleContext) { return } - // Update hidden API paths. - j.hiddenAPIUpdatePaths(ctx, dexOutputFile, outputFile) + // Initialize the hiddenapi structure. + j.initHiddenAPI(ctx, dexOutputFile, outputFile) // Encode hidden API flags in dex file. dexOutputFile = j.hiddenAPIEncodeDex(ctx, dexOutputFile, proptools.Bool(j.dexProperties.Uncompress_dex)) |