Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3b54c2b0 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Preopt APEX system server jars for java_import." am: 6f0c1a1e

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1840056

Change-Id: Ifc6895e47d0e7e6ed7d593a9d5d767f6cd2cf566
parents 86a0c430 6f0c1a1e
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -1398,10 +1398,19 @@ func (j *Import) GenerateAndroidBuildActions(ctx android.ModuleContext) {
			if dexOutputPath := di.PrebuiltExportPath(apexRootRelativePathToJavaLib(j.BaseModuleName())); dexOutputPath != nil {
				dexJarFile := makeDexJarPathFromPath(dexOutputPath)
				j.dexJarFile = dexJarFile
				j.dexJarInstallFile = android.PathForModuleInPartitionInstall(ctx, "apex", ai.ApexVariationName, apexRootRelativePathToJavaLib(j.BaseModuleName()))
				installPath := android.PathForModuleInPartitionInstall(ctx, "apex", ai.ApexVariationName, apexRootRelativePathToJavaLib(j.BaseModuleName()))
				j.dexJarInstallFile = installPath

				// Initialize the hiddenapi structure.
				j.initHiddenAPI(ctx, dexJarFile, outputFile, nil)

				j.dexpreopter.installPath = j.dexpreopter.getInstallPath(ctx, installPath)
				if j.dexProperties.Uncompress_dex == nil {
					// If the value was not force-set by the user, use reasonable default based on the module.
					j.dexProperties.Uncompress_dex = proptools.BoolPtr(shouldUncompressDex(ctx, &j.dexpreopter))
				}
				j.dexpreopter.uncompressedDex = *j.dexProperties.Uncompress_dex
				j.dexpreopt(ctx, dexOutputPath)
			} 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.