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

Commit 0061c0d1 authored by Ulya Trafimovich's avatar Ulya Trafimovich
Browse files

Fix DONT_UNCOMPRESS_PRIV_APPS_DEXS for `android_app_import`.

Don't uncompress priv-app dex for `android_app_import` if
DONT_UNCOMPRESS_PRIV_APPS_DEXS is true. Update expected test results.

Bug: 194504107
Test: m nothing
Change-Id: I4e7aa1a3deea856f388ae5ecd9292301f8a09a2f
parent 55f72d70
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -204,9 +204,9 @@ func (a *AndroidAppImport) shouldUncompressDex(ctx android.ModuleContext) bool {
		return false
	}

	// Uncompress dex in APKs of privileged apps
	if ctx.Config().UncompressPrivAppDex() && a.Privileged() {
		return true
	// Uncompress dex in APKs of priv-apps if and only if DONT_UNCOMPRESS_PRIV_APPS_DEXS is false.
	if a.Privileged() {
		return ctx.Config().UncompressPrivAppDex()
	}

	return shouldUncompressDex(ctx, &a.dexpreopter)
+3 −3
Original line number Diff line number Diff line
@@ -705,10 +705,10 @@ func TestAndroidTestImport_UncompressDex(t *testing.T) {
		expect := !unbundled
		if strings.Contains(bp, "privileged: true") {
			if dontUncompressPrivAppDexs {
				// TODO(b/194504107): DONT_UNCOMPRESS_PRIV_APPS_DEXS should disable uncompression of priv-apps no matter what.
				// expect = false
				expect = false
			} else {
				// TODO(b/194504107): shouldn't priv-apps be always uncompressed unless DONT_UNCOMPRESS_PRIV_APPS_DEXS is true?
				// TODO(b/194504107): shouldn't priv-apps be always uncompressed unless
				// DONT_UNCOMPRESS_PRIV_APPS_DEXS is true (regardless of unbundling)?
				// expect = true
			}
		}