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

Commit 940b98ee authored by Colin Cross's avatar Colin Cross
Browse files

Disable AAPT2 for modules that use missing features

Use LOCAL_USE_AAPT2 := false to disable AAPT2 for modules that
use features that are not implemented in AAPT2.

Fixes:
frameworks/base/core/tests/coretests/apks/install_multi_package/AndroidManifest.xml:46: error: unexpected element <package> found in <manifest>.
frameworks/base/core/tests/coretests/apks/install_multi_package/AndroidManifest.xml:82: error: unexpected element <package> found in <manifest>.
frameworks/base/core/tests/coretests/apks/install_verifier_bad/AndroidManifest.xml:19: error: unexpected element <package-verifier> found in <manifest>.
frameworks/base/core/tests/coretests/apks/install_verifier_good/AndroidManifest.xml:19: error: unexpected element <package-verifier> found in <manifest>.
frameworks/base/packages/CtsShim/build/shim/AndroidManifest.xml:25: error: unexpected element <restrict-update> found in <manifest>.
frameworks/base/tests/ActivityTests/AndroidManifest.xml:42: error: unexpected element <preferred> found in <manifest><application><activity>.
out/target/common/obj/APPS/CtsShimPriv_intermediates/AndroidManifest.xml:25: error: unexpected element <restrict-update> found in <manifest>.
frameworks/base/core/tests/coretests/AndroidManifest.xml:26: error: unexpected element <meta-data> found in <manifest><permission>.
...

Bug: 79755007
Test: m FORCE_AAPT2=true java
Change-Id: I393b697c521ab2a4fbc00b29a43aed6b4729b9a8
parent 001d2aed
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -49,6 +49,11 @@ LOCAL_CERTIFICATE := platform
FrameworkCoreTests_intermediates := $(call intermediates-dir-for,APPS,$(LOCAL_PACKAGE_NAME))/test_apks/res
LOCAL_RESOURCE_DIR := $(FrameworkCoreTests_intermediates) $(LOCAL_PATH)/res

# Disable AAPT2 to fix:
# frameworks/base/core/tests/coretests/AndroidManifest.xml:26: error: unknown element <meta-data> found.
# TODO(b/79755007): Re-enable AAPT2 when it supports the missing features.
LOCAL_USE_AAPT2 := false

include $(BUILD_PACKAGE)
# Rules to copy all the test apks to the intermediate raw resource directory
FrameworkCoreTests_all_apks_res := $(addprefix $(FrameworkCoreTests_intermediates)/raw/, \
+5 −0
Original line number Diff line number Diff line
@@ -7,6 +7,11 @@ LOCAL_SRC_FILES := $(call all-subdir-java-files)

LOCAL_PACKAGE_NAME := install_multi_package

# Disable AAPT2 to fix:
# frameworks/base/core/tests/coretests/apks/install_multi_package/AndroidManifest.xml:46: error: unexpected element <package> found in <manifest>.
# TODO(b/79755007): Re-enable AAPT2 when it supports the missing features.
LOCAL_USE_AAPT2 := false

include $(FrameworkCoreTests_BUILD_PACKAGE)
#include $(BUILD_PACKAGE)
+5 −0
Original line number Diff line number Diff line
@@ -5,4 +5,9 @@ LOCAL_SRC_FILES := $(call all-subdir-java-files)

LOCAL_PACKAGE_NAME := install_verifier_bad

# Disable AAPT2 to fix:
# frameworks/base/core/tests/coretests/apks/install_verifier_bad/AndroidManifest.xml:19: error: unexpected element <package-verifier> found in <manifest>.
# TODO(b/79755007): Re-enable AAPT2 when it supports the missing features.
LOCAL_USE_AAPT2 := false

include $(FrameworkCoreTests_BUILD_PACKAGE)
+5 −0
Original line number Diff line number Diff line
@@ -5,4 +5,9 @@ LOCAL_SRC_FILES := $(call all-subdir-java-files)

LOCAL_PACKAGE_NAME := install_verifier_good

# Disable AAPT2 to fix:
# frameworks/base/core/tests/coretests/apks/install_verifier_good/AndroidManifest.xml:19: error: unexpected element <package-verifier> found in <manifest>.
# TODO(b/79755007): Re-enable AAPT2 when it supports the missing features.
LOCAL_USE_AAPT2 := false

include $(FrameworkCoreTests_BUILD_PACKAGE)
+10 −0
Original line number Diff line number Diff line
@@ -66,6 +66,11 @@ LOCAL_FULL_MANIFEST_FILE := $(gen)
LOCAL_MULTILIB := both
LOCAL_JNI_SHARED_LIBRARIES := libshim_jni

# Disable AAPT2 to fix:
# out/target/common/obj/APPS/CtsShimPriv_intermediates/AndroidManifest.xml:25: error: unexpected element <restrict-update> found in <manifest>.
# TODO(b/79755007): Re-enable AAPT2 when it supports the missing features.
LOCAL_USE_AAPT2 := false

include $(BUILD_PACKAGE)

###########################################################
@@ -106,6 +111,11 @@ LOCAL_PACKAGE_NAME := CtsShim

LOCAL_MANIFEST_FILE := shim/AndroidManifest.xml

# Disable AAPT2 to fix:
# frameworks/base/packages/CtsShim/build/shim/AndroidManifest.xml:25: error: unexpected element <restrict-update> found in <manifest>.
# TODO(b/79755007): Re-enable AAPT2 when it supports the missing features.
LOCAL_USE_AAPT2 := false

include $(BUILD_PACKAGE)

###########################################################
Loading