The results of CollectLocations() are only used if the --proguard-conditional-keep-rules option is set, but the function is always called when the --proguard option is set.
Since this function can be slow on particularly large resource sets, avoid calling it unless --proguard-conditional-keep-rules is set.
Change-Id: If259d41cdab16abad8ca62f30d8beb5ebf33575a
Bug: 144236322
Test: aapt2_tests
When the protobuf header (or data payload) size are a multiple of 4,
"entry_length" (called "aligned size" in the code) would have counted bytes that
are never actually written.
Bug: 139418052
Change-Id: Ia688a82a67f3807f7feb0be03670bf2827b1d6a1
(cherry picked from commit b99e50922b)
std::set only works correctly when the < comparator is a strict weak
ordering, while UsageLocation::operator< was actually implementing !=.
Bug: 134190468
Change-Id: Icb9407e9c8451f9fcb4eb9b2cea310e3bcaf159e
Tested: aapt2_tests, and b/134190468#comment1
(cherry picked from commit 44fa342eb9)
This fixes a bug where cedegen fails for files that were generated before
end of generated code section markers were introduced.
Test: . master/frameworks/base/tests/Codegen/runTest.sh
Change-Id: Ia68e8124fcbdeeb2052067ba8731e68e42007529
Adds support for arbitrarily-nested @DataClasses
Only static ones are supported for now
See FileInfo for the main implementation piece
Fixes: 139833958
Test: . frameworks/base/tests/Codegen/runTest.sh
Change-Id: I31cd16969788c47003a7a15a3573a4bf623ab960
Adds a test that verifies we compute the correct hash end-to-end, i.e. including
the actual path logic, which previously caused a divergence between the viewer config
and the generated code.
Test: atest protologtool-tests
Change-Id: Ia2a414322aa6ccdaedda7f9754d903ec984902d6
Fixes a bug caused by inconsistent paths - when transforming sources, we took the
path of the file, while when generating the viewer json, we used the path relative
to the root package.
Test: enable protolog, verify winscope can parse it.
Change-Id: Ib636515d70ca5b66da687542a84107465e51053d
Per recommendation from wifi team, this is an important filter to provide
Test: manual
Fixes: 143313206
Change-Id: Ifcad0f6ce5134854114aa9df97b2c44ece858a30
When the protobuf header (or data payload) size are a multiple of 4,
"entry_length" (called "aligned size" in the code) would have counted bytes that
are never actually written.
Bug: 139418052
Change-Id: Ia688a82a67f3807f7feb0be03670bf2827b1d6a1
libstatslog is a blocker for some fuzzing. Our continuous fuzzing
infrastructure requires a statically-linked binary, and things depend on
libstatslog down the chain. We should allow libstatslog to be linked
statically.
Bug: N/A
Test: m libstatslog
Change-Id: Ic742a90daf6cbb5d197784416626256bfb6182b7
We introduce a generated class ProtoLog$Cache, which contains a field
for each ProtoLogGroup to cache whether it is enabled or not.
This both makes lookup faster, and reduces code size.
Test: make droid
Change-Id: I581c87849c875918b182eff85996b6d19a6755ec
Improves build time by speeding up the protolog source transformation
tool:
- parallelize the transformation to use all available cores
- remove dependency on lexicographically preserving printer
- disable comment attribution and language level validation
Speeds up the build step from ~30s to ~4s.
Test: atest protologtool-tests
Test: make services.core.protologsrc && edit file in fw/base/services/core && time make services.core.protologsrc
Change-Id: I052e9eb3cc791edf60c555c6fcf59f2e59f0ba68
This change allows RROs to reference their own internal resources as
expected.
Overlays are loaded as shared libraries so they can have their own
resource id space that does not conflict with the resource id space of
the target or other overlays.
References to overlay resources that override target resources now
appear as references to the target resources.
Overlay values that are inlined into the xml file specified using
android:overlayResources are now able to be used at runtime.
See go/rro-references for more information.
Bug: 135943783
Test: idmap2_tests
Test: libandroidfw_tests
Change-Id: Ie349c56d7fd3f7d94b7d595ed6d01dc6b59b6178
protoc-gen-javastream is failing to build for the static_sdk_tools
build target. This is because libprotoc is included as a shared
library in the protoc-gen-javastream target. Link libprotoc statically
to allow for the sdk tools to build.
Bug: 142536936
Test: m -j protoc-gen-javastream BUILD_HOST_static=1
Change-Id: I53e1263c774530f36ff16ab8dada3e0e715e63e0
We don't want to recommend this, but some legacy framework classes use
inheritance, and it's easy enough to support
Fixes: 142081378
Test: . frameworks/base/tests/Codegen/runTest.sh
Change-Id: Ifb7f34abf1dfb871ac01b9a9a38dfee144e5f49a
Also added a test for some similar parcelling corner cases
Test: . frameworks/base/tests/Codegen/runTest.sh
Fixes: 141877655
Change-Id: Iad5c3b0a8489206754f6ebe6acb8b56ba9ca174a
Improves behavior when parsing fails; now, ProtoLog skips the offending files, and
relies on the subsequent compilation step to catch the error.
Additionally, the build no longer fails when the canonical protolog.json file contains
obsolete entries.
Test: Introduce syntax error in services/core/ file, make and verify error messaging is sound
Change-Id: Ic23dec4a14489316ecb0e46bbabe246ddae29655