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

Commit 61df14ac authored by Colin Cross's avatar Colin Cross
Browse files

Don't call dexpreopter methods on host modules

Only call the dexpreopter methods on device modules so broken
dexpreopt configs don't break host-only unbundled builds.

Bug: 207813628
Test: tradefed branch builds
Change-Id: I41deb765a29c5cef9130a4d26aad7f956f75cdd5
parent f2d126b3
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -592,12 +592,14 @@ func (j *Library) GenerateAndroidBuildActions(ctx android.ModuleContext) {
	}

	j.checkSdkVersions(ctx)
	if ctx.Device() {
		j.dexpreopter.installPath = j.dexpreopter.getInstallPath(
			ctx, android.PathForModuleInstall(ctx, "framework", j.Stem()+".jar"))
		j.dexpreopter.isSDKLibrary = j.deviceProperties.IsSDKLibrary
		setUncompressDex(ctx, &j.dexpreopter, &j.dexer)
		j.dexpreopter.uncompressedDex = *j.dexProperties.Uncompress_dex
		j.classLoaderContexts = j.usesLibrary.classLoaderContextForUsesLibDeps(ctx)
	}
	j.compile(ctx, nil)

	// Collect the module directory for IDE info in java/jdeps.go.