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

Commit 7b8a567f authored by Colin Cross's avatar Colin Cross
Browse files

Don't build hiddenapi flags or encode dex for unbundled builds

Builds with TARGET_BUILD_APPS shouldn't build the hiddenapi flags
or encode dex files even if frameworks/base exists.

Bug: 133343287
Test: mainline modules build
Change-Id: I0647451420fd09bb680808b35e1ad3b8f514ba46
Merged-In: I0647451420fd09bb680808b35e1ad3b8f514ba46
(cherry picked from commit 9c74a1ee)
parent f2562eb4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ func (h *hiddenAPISingleton) GenerateBuildActions(ctx android.SingletonContext)
	stubFlagsRule(ctx)

	// These rules depend on files located in frameworks/base, skip them if running in a tree that doesn't have them.
	if ctx.Config().FrameworksBaseDirExists(ctx) {
	if ctx.Config().FrameworksBaseDirExists(ctx) && !ctx.Config().UnbundledBuild() {
		h.flags = flagsRule(ctx)
		h.metadata = metadataRule(ctx)
	} else {
+5 −3
Original line number Diff line number Diff line
@@ -1270,9 +1270,11 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars ...android.Path
			return
		}

		if !ctx.Config().UnbundledBuild() {
			// Hidden API CSV generation and dex encoding
			dexOutputFile = j.hiddenAPI.hiddenAPI(ctx, dexOutputFile, j.implementationJarFile,
				j.deviceProperties.UncompressDex)
		}

		// merge dex jar with resources if necessary
		if j.resourceJar != nil {