summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2021-05-14 14:18:47 +0100
committerPaul Duffin <paulduffin@google.com>2021-05-18 07:59:52 +0100
commitf88ab95d857a38f73a490684fc8ae8911d675c21 (patch)
tree2c0a934ff00546e72c515941be9afa725481f817 /java/java.go
parent59190602afc97954e18c266b516c1287b43e1657 (diff)
Merge initHiddenAPI and hiddenAPIUpdatePaths
These two methods did very similar jobs and merging them together simplifies the behavior. Bug: 179354495 Test: m droid Merged-In: Ibe1a23d54105e6a0e5693079cd8743679301fc85 Change-Id: Ibe1a23d54105e6a0e5693079cd8743679301fc85 (cherry picked from commit 74d18d1d6ff1ad8ec47c34182d1a22945e05e9d5)
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go14
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))