Since the VirtualKeyMap has been refactored, updated the
validation tool to use the new signature.
Bug: 113575658
Test: atest libinput_tests inputflinger_tests
Change-Id: Ifb0eb5b2913020f1e1402dcb6a36c9038c345807
If the inner element of a <plurals> tag fails to parse, aapt2 will seg
fault. Don't do that.
Bug: 123423125
Test: manual
Change-Id: Iff39fa84073da62d85279683ac3d03b7309bc5e3
Add encoding/decoding of new policy for overlays. Signature enforces
that an overlay package is signed with the same key as the actor of
the target resource, so that an overlay can be installed by the user
as a normal app but restricted to those built by the author of the
actor (which can be the same as the target).
This also enforces that a valid policy is specified.
This doesn't implement the actors nor the signature check.
Bug: 119402606
Test: ResourceParserTest ParseOverlayablePolicy
Test: ProtoSerializerTest SerializeAndDeserializeOverlayable
Test: aapt2_tests
Change-Id: I8495ad790c2ebd51759bc6eba81149680c209475
Adds the new enum values for none and the new signature policy.
None is needed to ensure we don't accidentally deserialize public,
as protobuf uses the first or 0 value enum as the default.
Test: aapt2_tests pass
Change-Id: Ibcb6b961abaa7e5c048e80c4a3eaf1b6d1d421b5
AAPT(1) encodes platformBuildVersionCode and
platformBuildVersionName into the manifest along with
compileSdkVersion and compileSdkVersionCodename. AAPT2 was extracting
the platform attributes from the app being created rather than the
framework.
This change inserts the correct platform attributes.
Bug: 124227171
Test: aapt2_tests
Change-Id: I4bc7986d25f065cecf01b9e988de4d37283ef7de
When loading the binary APK, do not set the paths of Source structs to
the path of the binary APK. This causes the merge_zips step of the build
system to fail.
Bug: 124082573
Test: vendor/google/build/build_mainline_modules.sh
Change-Id: I84b8d43c5b6a5835e7ff6bd579c4eb744e02c20f
This is the C++ counterpart of the enum generation for Java done in
ag/I1ad19b86e28d0df0f8c15d4c995d101423cff4c2
Bug: 120990429
Test: builds successfully, logged one of atoms with an enum in C++ code and verified statsd logcat
Change-Id: I2c1452c0590aecdef0dbede6d88014c748e6509e
AaptAsssets intentinally falls through in a switch statement.
This change adds [[fallthrough]]; to suppress this implicit fallthrough.
frameworks/base/tools/aapt/AaptAssets.cpp:305:17: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
case 5:
^
frameworks/base/tools/aapt/AaptAssets.cpp:305:17: note: insert '[[fallthrough]];' to silence this warning
case 5:
^
[[fallthrough]];
frameworks/base/tools/aapt/AaptAssets.cpp:305:17: note: insert 'break;' to avoid fall-through
case 5:
^
break;
Test: make -j aapt
Change-Id: Ia9d2ca3b59eb804e20c6295791f6a19f0f5f63ab
Adds --exclude-configs to remove matching configs from resulting APK. This matches on explicitness, so if the resource contains all the flags set by the option exactly, it will be removed, but not the other way around.
"--exclude-configs fr" with fr-land resource will remove.
"--exclude-configs fr-land" with fr resource will not remove.
Bug: 119678846
Test: aapt2_tests ResourceExcluder_test
Test: manually ran link on a test set of res
Change-Id: Ieccdecde4aea1fa0502abfd092dffa7da8f929ea
There was no check for whether we had already written a specific file path to the APK when using the convert command.
If the resources table points 2 resource IDs at the same file on disk, the convert command would write the file twice, creating two entries.
This holds a set of file paths already written and ignores duplicates.
Bug: 123271593
Test: Ran convert on linked bug's weird.apk
Test: aapt2_tests case for duplicate entries
Change-Id: Ia22515bf8e8297624aaadbf6a9e47159026c63e5
In AAPT, if --no-version-vectors is added and an XML file is a vector, it prevents the entire XML's contents, including children attributes, from being split by version for compat.
In AAPT2, each element is checked individually, and so "set" has to be ignored manually.
Bug: 111056281
Test: Compiled avd_progress_indeterminate_horizontal.xml linked in bug
Change-Id: I20a7888f36cf5923b6dd8e3b701243c74f8d421b
This gives better consistency with the release key. Also improve the
debug_sign script to use base64, to eliminate issues with escaping and
newlines.
Bug: 110509075
Test: atest CtsSignedConfigHostTestCases
Change-Id: Id8d7b6b5bee3340803d30d3a4a34c7e62f565a93
The annotation_processors property is deprecated, replace it with
plugins, and use java_plugin for modules that provide annotation
processors.
Bug: 77284273
Test: m checkbuild
Change-Id: I467b899e0c8f2c8fa74a9bfbe6e952ad0f7aa009
To try and solve test flakiness, hold the unique_ptr in the method scope to make sure it's cleaned up after we assert on it.
Bug: 123079798
Test: gonna merge and check for failures, since it passes locally
Change-Id: Id348d1112832cbb82f605a84ef675c25a7488b11
Do not copy the png data when compiling pngs.
Bug: 122950060
Test: aapt2 compile -o . BaseAppPhoto1_copy.png
Change-Id: I78fbdaa9a40ada406d7b07cf072d6cd76124168e
The annotation_processors property is deprecated, replace it with
plugins, and use java_plugin for modules that provide annotation
processors.
Bug: 77284273
Test: m checkbuild
Change-Id: I14ed4d81e097510866cbb9a27c72be4426117885