Commit Graph

1223 Commits

Author SHA1 Message Date
Yurii Zubrytskyi
f453228161 frameworks/base - Tiramisu is now 33 #2
Set current API level

Test: Build and boot
Bug: 225745567
Change-Id: If135d9795e812cc286c720b9351eaf6be621fd5b
2022-04-12 12:35:04 -07:00
Treehugger Robot
2f58e1c38c Merge "Change aapt2 to specify full protos" am: 6787226865 am: 3da3dce716 am: ccd8e91bf1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2037107

Change-Id: I23fd8af293fc5acd7748294d6cb61289565b8c1a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-06 21:32:06 +00:00
Treehugger Robot
6787226865 Merge "Change aapt2 to specify full protos" 2022-04-06 19:29:13 +00:00
Treehugger Robot
2cb1c26875 Merge "Non-module targets." am: 3f0139b119 am: 6dc0c9f780 am: 824f062400
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2052132

Change-Id: I27b00e66ce73673d6add6d74a78b6eff0639b1b7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-04 14:31:29 +00:00
Treehugger Robot
3f0139b119 Merge "Non-module targets." 2022-04-04 13:34:50 +00:00
Treehugger Robot
e1cbf0b117 Merge "Add context to error message." am: 0754714469 am: 82e2afb277 am: e210ca9e34
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2052076

Change-Id: I4669a3e8ffd72d7591d4c6713942072f998b82f8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-01 22:56:53 +00:00
Bob Badour
93aa95f71a Add context to error message.
Would have been very useful to avoid http://b/227682097

Bug: 227682097

Test: m apexer apexer_test deapexer debugfs_static; atest --host apexer_test
Change-Id: I24234d053a06868493831d40f94f7e46956391a1
2022-04-01 15:21:26 +00:00
Bob Badour
a61f3e446f Non-module targets.
Bug: 151177513
Bug: 213388645
Bug: 210912771

Test: m droid dist reportmissinglicenses

Change-Id: I1982a50b33924a051d7cfcdf18dd1f0f00fa1c0f
2022-03-31 19:37:56 -07:00
Liz Kammer
ba0a32c303 Change aapt2 to specify full protos
Soong's cc support for protos is inconsistent, it adds a dependency on
lite proto library is proto.type is unspecified, but builds as full.
Update aapt2 to explicitly build full protos rather than rely on
Soong's inconsistent defaulting of proto.type

Test: CI
Change-Id: I5600d04c7ac32a04fd2b230912e02280a3874812
2022-03-28 21:40:53 +00:00
Winson
8d4fc82250 Document resources staging groups and finalization
Includes instructions on how to expose new public resource IDs
and how to "remove" unused resource IDs before finalization.

Temporarily restricts OWNERS to ensure T remains stable until
a long term static analysis solution is found.

Fixes the script for finalization to handle split files and
seed the next release's staging-public-group blocks.

Bug: 222537368

Test: manual, checked build before and after mock finalization

Change-Id: I901a80e487f5eaab9689f469196648535857e0e1
2022-03-08 09:11:37 -08:00
Winson Chiu
c84829d2d4 AAPT2: support removed_ entries in groups
Ignores and increments the ID if the entry contains removed_, to prevent
shifting IDs by leaving a hole, allowing staging resources to be removed
before finalization.

This was broken out from the parent change to allow other CLs fixing the
resource IDs to be merged without splitting public.xml.

Bug: 222537368

Test: manual, see bug for other changes

Change-Id: I56f4fd70824bd42ec62f4fa0a2f067e2a3c094b5
2022-03-04 21:36:27 +00:00
Iurii Makhno
cff10cec6c Switch ResourceName to use ResourceNamedType instead of ResourceType.
DD: go/custom-resource-types-in-aapt2

Bug: b/215108200
Test: Resource_test.cpp
Change-Id: I0b97fc0024523700e01adce788bb934d388da288
2022-02-16 20:23:24 +00:00
Iurii Makhno
dfbac39d38 Introduce ResourceNamedType that represents pair of name + ResourceType.
This type will be used as part of ResourceName to support types with
custom names inside aapt2.

DD: go/custom-resource-types-in-aapt2

Bug: b/215108200
Test: Resource_test.cpp
Change-Id: Ib09776e6b2f69fefb9724136a345dc25bea42573
2022-02-16 20:07:05 +00:00
Makoto Onuki
22a931eaab AAPT2: Emit @keep for sub-process app classes
Test: atest aapt2_tests
Bug: 197264681
Change-Id: I1f6cabfd0f3ce4c3c661d9dc132629d8c83048d9
2022-01-12 16:03:50 -08:00
Wei Su
ebe021a618 Merge "Write files in a temporary directory" am: efa03939f0 am: 49eec50a4a am: 28a89f1860 am: 72f49a1a3d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1920049

Change-Id: I8aea202a97f28e612a6e17eabc604948f92d48f7
2022-01-11 17:24:51 +00:00
Wei Su
72f49a1a3d Merge "Write files in a temporary directory" am: efa03939f0 am: 49eec50a4a am: 28a89f1860
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1920049

Change-Id: I3e26413428dea2deaeaa25146c65fae71c688718
2022-01-11 17:20:56 +00:00
Wei Su
28a89f1860 Merge "Write files in a temporary directory" am: efa03939f0 am: 49eec50a4a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1920049

Change-Id: If2e8b41a886a316346b60da996ef3745835c1b0e
2022-01-11 17:06:06 +00:00
weisu
90d3fb6354 Write files in a temporary directory
Avoid writing test files in the build output directory which fails when
run with Bazel. This happens because Bazel's sandboxing environment
ensures that the test's working directory is unwritable.

See https://docs.bazel.build/versions/main/sandboxing.html for more
information.

Bug: 209687942
Test: atest --bazel-mode aapt2_tests
Test: atest aapt2_tests

Change-Id: I0fce701bbac255c3e308ad5c85aa27230c3b620b
2022-01-05 23:05:14 +00:00
Makoto Onuki
808fd192fa Support per-process Application class in <process> tag
Bug: 197264681
Test: atest CtsProcessTest
Change-Id: I08889ed16fadb956715499dc7cee567d10988e61
2021-12-10 16:32:11 -08:00
Gavin Corkery
ad5d4baecb Add apex-system-service tag to AndroidManifest.
This change introduces a new <apex-system-service> tag to the manifest.

A manifest may have multiple <apex-system-service> tags, with each tag
denoting one system service that lives in an apex. If the service is
not in SYSTEMSERVERCLASSPATH, the android:path attribute may be used to
indicate where the jar is located on the filesystem. The minSdkVersion
and maxSdkVersion attributes may be used to indicate which SDKs the
service should start on.

Test: atest PackageParserTest
Bug: 192880996
Change-Id: I28e595b397ed8db6c412f490f12c73537972efab
2021-12-08 16:00:26 +00:00
Alex Buynytskyy
a16137055f Revert "Revert "SDK libraries.""
This reverts commit a22b7e05d4.

Reason for revert: This is a roll forwards with the fix applied.

Fixes: 208710019

Change-Id: Id4e9029ebe5864ddcc5583ce525e8e70da79f82c
2021-12-02 19:39:09 +00:00
Rick Yiu
a22b7e05d4 Revert "SDK libraries."
This reverts commit 8d0ec8faa8.

Reason for revert: DroidMonitor: Potential culprit for Bug 208710019 - verifying through Forrest before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted

Change-Id: Ic1ff41e7648afc0fa50081de9b7d538a49c6468a
2021-12-02 04:23:16 +00:00
Alex Buynytskyy
8d0ec8faa8 SDK libraries.
Design: go/sdk-android

Basic boilerplate code, only adding a concept of SDK library to the OS.
Additional public APIs and more custom processing are to follow.

Tests are added in ag/16348319.
Can't submit together because of the checked build error: AndroidManifest.xml:32: Error: Misspelled tag <sdk-library>: Did you mean <uses-library> ? [ManifestTypo]
Apparently it needs updated aapt2 before it can process the new manifest even though the aapt2 is part of this change.

Bug: 207413168
Test: atest AndroidPackageTest ScanTests PackageManagerSettingsTests PackageManagerComponentLabelIconOverrideTest PackageManagerShellCommandTest

Change-Id: I9ea77ba3a0550ef7d58778a3a6cb402f09e2d8d7
2021-11-30 23:11:28 +00:00
TreeHugger Robot
994d2edbdd Merge "Revert "Revert "Remove the implementation of libaapt2_jni in bui..."" 2021-11-29 19:35:49 +00:00
Xin Li
10d9972786 Merge sc-qpr1-dev-plus-aosp-without-vendor@7810918
Bug: 205056467
Merged-In: I13199bc39e9445929195f3d15579cbffe94e92b0
Change-Id: I35fa3c6c2abf679c51033f1395a08d511ed8739f
2021-11-18 17:00:37 +00:00
Luke Edgar
3129a0d453 Merge "AAPT Files - Permit invariant filepaths for getting file names" am: 0ba2a37eaf am: c8b5598a14 am: b568a8202c am: 4b7dd9fced am: 94643cc013
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1884590

Change-Id: I2fbc7dc5f3aea8d574ed00d3ab4f6536fc2bdae0
2021-11-11 11:20:29 +00:00
Luke Edgar
94643cc013 Merge "AAPT Files - Permit invariant filepaths for getting file names" am: 0ba2a37eaf am: c8b5598a14 am: b568a8202c am: 4b7dd9fced
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1884590

Change-Id: Ibcb2b129b94db1d3a83160c2b413792c24509c79
2021-11-11 11:02:04 +00:00
Luke Edgar
0ba2a37eaf Merge "AAPT Files - Permit invariant filepaths for getting file names" 2021-11-11 09:17:33 +00:00
Luke Edgar
9109a415b2 AAPT Files - Permit invariant filepaths for getting file names
AAPT compile provides a "--source-path" option that instructs aapt to
use a provided source path rather than the default source resource as
resource orgin. However, this is not file system agnostic. This causes
incorrect outputs of AAPT link, as source path parsing is tied to the
file system. This change ensures that AAPT Files::getFilename can parse
filepaths, regardless of file system filepath type.

Bug: 141301405, 155218379
Test: manually tested on windows with a unix style filepath, passes aapt
tests
Change-Id: I548de01ad513b549dc30eb35d2a59813fa3d4e69
2021-11-10 10:42:05 +00:00
Treehugger Robot
b14671ef58 Merge "Update the resources owner files" am: 70d5485b28 am: bbf64f041e am: 2512fc7380 am: 187863655c am: 2999ac25fb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1884705

Change-Id: Ib8678bba4656240da3298446d8c8b7359536d7ff
2021-11-09 18:32:23 +00:00
Treehugger Robot
2999ac25fb Merge "Update the resources owner files" am: 70d5485b28 am: bbf64f041e am: 2512fc7380 am: 187863655c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1884705

Change-Id: I65f147d6f81268b215338bd40a138227ff8befa4
2021-11-09 18:28:20 +00:00
Yurii Zubrytskyi
4c87aec35f Update the resources owner files
Bug: 205633893
Test: n/a

Change-Id: Ib9cf70c9acb200e8019a6522cb6a85f85b760651
2021-11-08 16:25:33 -08:00
Michael Wright
d5f12360fd Merge "Update AAPT for S V2." into sc-v2-dev am: af23af4c83
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16140646

Change-Id: I6b713a4e45e82d2a0ed2a117d505cbd84aea4175
2021-11-06 16:06:50 +00:00
Michael Wright
6aa3b2c86d Update AAPT for S V2.
Bug: 204295952
Test: N/A
Change-Id: I14f5d90ae913248e0c9f5776963fa5f66c4f6a7a
Merged-In: I14f5d90ae913248e0c9f5776963fa5f66c4f6a7a
2021-11-05 19:37:25 +00:00
Michael Wright
06f673e553 Merge changes from topic "cherrypick-final-32-khu88k0v6u"
* changes:
  Update @RequiresApi declarations for T to be 33.
  Update AAPT for S V2.
2021-11-05 02:10:39 +00:00
Jeremy Meyer
9cc2d10a93 Merge "Dont include day/time or ldap for eng aapt2 builds" 2021-11-02 18:48:57 +00:00
Michael Wright
534f29822a Update AAPT for S V2.
Bug: 204295952
Test: N/A
Change-Id: I14f5d90ae913248e0c9f5776963fa5f66c4f6a7a
2021-11-02 11:58:24 +00:00
Felka Chang
dc0938c090 Revert "Revert "Remove the implementation of libaapt2_jni in bui..."
Revert^2 "Remove the reference of libaapt2_jni in build file"

46fe10698b38f405085a24d23e4371cd1c4bc63c

Change-Id: Id50c2a7cf12d1078ab4afc2d75251c12a34cfc0b
2021-11-02 00:57:46 +00:00
Prateek Shrivastava
1f6d59c541 Merge "Revert "Remove the implementation of libaapt2_jni in build file"" 2021-11-02 00:00:58 +00:00
Prateek Shrivastava
49a757d488 Revert "Remove the implementation of libaapt2_jni in build file"
Revert "Remove the reference of libaapt2_jni in build file"

Revert submission 16102170-remove_libaapt2_jni

Reason for revert: b/204805075 breakages on git_master - BuildMonitor
Reverted Changes:
I2331fcac1:Remove the reference of libaapt2_jni in build file...
I193ff8b5b:Remove the implementation of libaapt2_jni in build...

Change-Id: I37384f995bf34df3cc2654e1439ceecc720243ac
2021-11-01 23:49:52 +00:00
Jeremy Meyer
7f592a8a35 Dont include day/time or ldap for eng aapt2 builds
Previously, eng builds included a fingerprint that was a combination of
the developers ldap, the date, and the time. This meant that the build
system (including RBE) couldn't cache the ouput of aapt. This removes
the ldap, day, and time part of that so that caching will work.

Fixes: 200741997
Test: ran `aapt2 version` to verify the updated format
Change-Id: Id0d1ff99c8fbbf18261d3fc06f21b2969ed2e247
2021-11-01 21:21:48 +00:00
TreeHugger Robot
eda8dd1d0b Merge "Remove the implementation of libaapt2_jni in build file" 2021-11-01 18:35:20 +00:00
TreeHugger Robot
371454135e Merge "Fix bugprone-use-after-move in ResourceParser" 2021-10-28 21:27:28 +00:00
Felka Chang
5cf069b2ea Fix bugprone-use-after-move in ResourceParser
This patch uses reinitialization to solve clang_tidy
bugprone-use-after-move warning in ResourceParser.

The local variables `comment` in functions is used to record comments
in XML. After calling std::move(comment), to use comment.clear() to
reinitialize the value of the variable `comment`.

Reference: https://clang.llvm.org/extra/clang-tidy/checks/\
    bugprone-use-after-move.html

Test: export WITH_TIDY=1 ; \
      rm -rf out/soong/.intermediates/frameworks/base/tools/aapt2* \
      out/host/linux-x86/bin/aapt* \
      out/host/windows-x86/bin/aapt* ;\
      make aapt2

Bug: 150953574
Change-Id: I5658eaedf48e46fb5e7f12a510b83f490f9bc94b
2021-10-29 03:09:55 +08:00
Yurii Zubrytskyi
4ac6788806 [aapt2] Fix finalized resources removal am: 834f4e6c92 am: db1380f10a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16102684

Change-Id: I0b84d396f4fd1e2f330b5c5b68960d44e4847933
2021-10-28 00:10:16 +00:00
Yurii Zubrytskyi
db1380f10a [aapt2] Fix finalized resources removal am: 834f4e6c92
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16102684

Change-Id: Iff52edf4399c67d2b0a6b4a9779f2825b277b4f0
2021-10-27 23:42:20 +00:00
TreeHugger Robot
c27e4cdfa3 Merge "[aapt2] Support ConfigVarying in CTS resources" 2021-10-25 16:37:28 +00:00
Felka Chang
25d2aa2e67 Remove the implementation of libaapt2_jni in build file
libaapt2_jni is ready to phase out. build-tools includes libaapt2_jni.
However, there is no usage of libaapt2_jni in AOSP so this patch
removes the implementation of libaapt2_jni and its header files.

Test: make clean; make

Bug: 203475226
Change-Id: I193ff8b5b2326f83f59f2591d2e2392dd75438d3
2021-10-25 14:35:26 +08:00
Yurii Zubrytskyi
ef4c88179b [aapt2] Support ConfigVarying in CTS resources
Treat it as Stylable, same as XML parsing works

Bug: 203821692
Test: aapt2 dump resources CtsContentTestCases.apk succeeds
Change-Id: I836495743aea1a19af9ed273a6b33f15494b2e97
2021-10-21 16:09:56 -07:00
Yurii Zubrytskyi
834f4e6c92 [aapt2] Fix finalized resources removal
The code used to expect all original staged resources to get
parsed before their finalized version. Looks like that's not the
actual case, and parsing code needs to expect those to come
later, and preserve the information that they aren't needed
anymore

Bug: 203779955
Test: manual, aapt2 dump resources <finalized framework SDK>
Change-Id: I6d9efe2eb7b406d05ca49a0a6ed745a1c509e2ef
2021-10-21 09:36:00 -07:00