Commit Graph

6972 Commits

Author SHA1 Message Date
TreeHugger Robot
5d1c9a388a Merge "Exposing WorkSource hidden APIs as system APIs" 2019-11-21 21:15:48 +00:00
TreeHugger Robot
6394799c47 Merge "Add @NonNull annotation to Builder.addXXX args" 2019-11-21 20:01:12 +00:00
Suprabh Shukla
f7cffa7aaf Exposing WorkSource hidden APIs as system APIs
Users of these APIs are planning to move to apex.

Test: atest FrameworksCoreTests:android.os.WorkSourceTest
atest CtsOsTestCases:android.os.cts.WorkSourceTest

Bug: 143551137
Change-Id: I2e97a8b469254ea92e3ee21571ee8ae3cbb9abbe
2019-11-20 14:26:47 -08:00
Anton Hansson
55b08655e9 Merge "Revert "Work around b/70221552"" am: 79995a5673 am: b2f181d3c3
am: 6f81d38eb0

Change-Id: I1674380d0b79b446e27ddffff32f708c12d3acc0
2019-11-19 19:43:20 -08:00
Mathew Inwood
ca4589bf8e Merge "Fix SignatureBuilder." am: d1219acf84 am: a8aa26d1ed
am: cb84d0811c

Change-Id: I2c9be5a7db203e1fef778fd44bac9b5da189f248
2019-11-19 19:40:22 -08:00
Anton Hansson
79995a5673 Merge "Revert "Work around b/70221552"" 2019-11-19 12:38:28 +00:00
Mathew Inwood
d1219acf84 Merge "Fix SignatureBuilder." 2019-11-19 12:11:39 +00:00
Eugene Susla
f745042916 Add @NonNull annotation to Builder.addXXX args
API guidelines is for each non-primitive arg to have a nullablility annotation.
Since it's very rate for collections to permit null values, just assume
collections only accept @NunNull emenents for now.

Fixes: 144725154
Test: . frameworks/base/tests/Codegen/runTest.sh
Change-Id: I333327490bd8eb9bb031f062c80283bd405173af
2019-11-18 16:39:55 -08:00
Anton Hansson
d82b2f7e4a Revert "Work around b/70221552"
This reverts commit 159799d7c9.

Reason for revert: b/70221552 is fixed

Change-Id: Iaae0df6736a3141847376b9ab0115f1c7a31fdb1
2019-11-18 13:40:45 +00:00
satayev
fe407f7afd Merge "Blacklist @TestApis by default." am: 0753b42c3f am: d19b7b9dfa
am: 7593f165af

Change-Id: I8208be1dd88c4bc9958184196e360e71931b7fbe
2019-11-15 11:21:36 -08:00
Artur Satayev
44036a7689 Blacklist @TestApis by default.
If the signature has @UnsupportedAppUsage or @SystemApi annotation as well, those take precedence and the API would either be whitelisted or greylisted accordingly. All other, "pure" @TestApi signatures would be blacklisted and only allowed access in instrumented processes.

Test: manual
Bug: 133832325
Change-Id: I4684929caed8be7c42c91fed33ddd2a3b67ae19b
2019-11-15 16:54:14 +00:00
Mathew Inwood
4e2a44234e Fix SignatureBuilder.
It seems the compiler has started adding a top level MODULE which broke
assumptions made in here.

Also add some tests to verify this and other basic functionality, so that
future such breaks may be caught sooner.

Test: m framework-annotation-proc-index
Test: atest unsupportedappusage-processor-test
Bug: 144495446
Change-Id: I43efb25c1600af15809d48aa84498a6800f713b1
2019-11-15 15:13:03 +00:00
TreeHugger Robot
d34013b779 Merge "Include ResourcesInternal.proto in aapt2-protos.zip" 2019-11-14 18:20:11 +00:00
Brian Duff
a950d5b4a6 Merge "Speed up WriteKeepSet when generate_conditional_proguard_rules is off." am: a9ee3aaa5f am: 1f44c03058
am: 65e3a342c4

Change-Id: Ifc50ebb69bb6e89fb74c147328eca3c90df7acbf
2019-11-12 16:21:35 -08:00
Brian Duff
2f7e4d1a82 Speed up WriteKeepSet when generate_conditional_proguard_rules is off.
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
2019-11-11 09:47:18 -08:00
Donald Chai
6e914e8baf Merge "Fix computation of 'entry_length' in AAPT2 container format" 2019-11-08 06:13:54 +00:00
Donald Chai
6f613875a1 Fix computation of 'entry_length' in AAPT2 container format
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)
2019-11-08 05:15:38 +00:00
Donald Chai
34ebc8f435 [aapt2] Fix infinite loop in proguard::CollectLocations
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)
2019-11-08 05:13:53 +00:00
Treehugger Robot
a5e26c955b Merge "[aapt2] Pseudolocalize <plurals> values." 2019-11-07 22:59:41 +00:00
Donald Chai
98c6138c70 [aapt2] Pseudolocalize <plurals> values.
(.won slaer roF)

Bug: 134190774
Test: aapt2_tests
Change-Id: If307af4adfb1d556c41d7cb08590d1c25287f992
(cherry picked from commit 4c3da0f8a4)
2019-11-07 10:32:09 -08:00
Izabela Orlowska
f53b67cecf Include ResourcesInternal.proto in aapt2-protos.zip
Bug: 144080617
Test: N/A
Change-Id: I71e9cacb9ba7e82024278f888ee6b6a18b43ca64
2019-11-07 11:59:18 +00:00
Adrian Roos
be6c7b4671 Merge "Merge "API Lint: remove obsolete python linter" am: d5ef2d61d1 am: 5d587aeb3f" into qt-qpr1-dev-plus-aosp
am: bf8a7f3b51

Change-Id: I4fac51ae512a7f29c1e499b15e2517922331d25c
2019-11-06 14:34:27 -08:00
Eugene Susla
c5c636a5ea Fix codegen ArrayMap fields
Fixes: 143112074
Test: . frameworks/base/tests/Codegen/runTest.sh
Change-Id: Iec0fa89a91955f8b4e4b5b8d4dd9d7f0b30c608f
2019-11-05 18:14:24 -08:00
Eugene Susla
89cc836c2e Merge "[codegen] Fix generation for files without end markers" 2019-11-04 18:04:57 +00:00
Eugene Susla
7daee0bba4 [codegen] Fix generation for files without end markers
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
2019-11-01 17:56:08 -07:00
Wenjie Zhou
0c1dd67d50 Merge "Add last logcat data to incident report" 2019-11-01 23:05:05 +00:00
TreeHugger Robot
184d14428a Merge "[codegen] Support nested classes" 2019-11-01 20:52:39 +00:00
zhouwenjie
c3bf8040a3 Add last logcat data to incident report
Bug: 142721354
Test: adb sehll incident -p EXPLICIT 1109
Change-Id: Iaee370310e36998e161955e0f12d98ac8cd8eb90
2019-11-01 11:24:44 -07:00
Eugene Susla
322e8b1772 [codegen] Support nested classes
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
2019-11-01 17:53:56 +00:00
Adrian Roos
7bf3cd9de8 API Lint: remove obsolete python linter
Linting is performed by metalava as part of the build now.

Test: n/a
Change-Id: I6223549657912fdf305a17f66f55b97561f7f7ac
2019-11-01 08:56:27 +01:00
Adrian Roos
a8685a3772 ProtoLog: Add end-to-end test
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
2019-10-31 18:04:00 +00:00
Adrian Roos
6599f2dea4 ProtoLog: Fix broken hash computation
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
2019-10-31 14:23:22 +01:00
TreeHugger Robot
4218fd8ffa Merge "Add CDM API to filter by BSSID bitmask" 2019-10-29 05:36:35 +00:00
Eugene Susla
f51f6c0d91 Add CDM API to filter by BSSID bitmask
Per recommendation from wifi team, this is an important filter to provide

Test: manual
Fixes: 143313206
Change-Id: Ifcad0f6ce5134854114aa9df97b2c44ece858a30
2019-10-24 23:45:02 +00:00
Mitch Phillips
82c4c5b507 Merge "Make libstatslog static-linkage compatible." am: 871d5592ff am: 33f59669ff am: 1c8ca2b2cc
am: 4de16c7cee

Change-Id: I2369b099598ae467cdd5a9ec5df244b9476076aa
2019-10-24 15:23:18 -07:00
Joe Onorato
fc17f8bf62 Merge "[bit] tests live in testcases directory now, not /data" 2019-10-24 00:00:08 +00:00
Joe Onorato
b42201bbd4 [bit] tests live in testcases directory now, not /data
Change-Id: I805ec5b6e239bc4044b7f058443639f806b577bd
2019-10-23 12:52:41 -07:00
Donald Chai
9a73a38d52 Merge "Fix computation of 'entry_length' in AAPT2 container format" 2019-10-22 01:08:26 +00:00
Donald Chai
b99e50922b Fix computation of 'entry_length' in AAPT2 container format
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
2019-10-21 15:14:05 -07:00
Mitch Phillips
6bbc91b375 Make libstatslog static-linkage compatible.
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
2019-10-21 13:32:14 -07:00
Adrian Roos
2ca5d8601c ProtoLog: Cache the result of ProtoLogImpl.isEnabled(ProtoLogGroup)
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
2019-10-18 18:22:30 +02:00
Adrian Roos
e301ccf8cf Merge "protolog: improve build time of frameworks/base/services" 2019-10-18 14:57:49 +00:00
Adrian Roos
fbcd32e552 protolog: improve build time of frameworks/base/services
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
2019-10-18 12:34:28 +02:00
Ryan Mitchell
63f7f98ebb Merge changes Ie349c56d,I5d5344cd
* changes:
  Allow for RRO internal referencing
  Idmap format changes for bidirectional lookup
2019-10-17 22:07:47 +00:00
Ryan Mitchell
8a891d86ab Allow for RRO internal referencing
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
2019-10-17 13:09:33 -07:00
Eugene Susla
1bfb5e7097 Add @NonNull to some generated methods' args
Test: . frameworks/base/tests/Codegen/runTest.sh
Fixes: 142783758
Change-Id: I7303d420efd59389c324b3e399fcb3532b5d6c37
2019-10-16 14:29:58 -07:00
TreeHugger Robot
e84f360457 Merge "Few minor codegen fixes" 2019-10-16 01:37:43 +00:00
Ryan Mitchell
b44570bc62 Merge "Allow protoc-gen-javastream to build statically" am: 6afb115dea am: 8e0b67272d am: 5e3a1ba15f
am: e44d96ec5c

Change-Id: I69a10e583c8671288316bd0e8c7a6b5184a8ec7d
2019-10-14 17:37:40 -07:00
Treehugger Robot
6afb115dea Merge "Allow protoc-gen-javastream to build statically" 2019-10-14 23:42:23 +00:00
Ryan Mitchell
055e6189f9 Allow protoc-gen-javastream to build statically
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
2019-10-14 10:06:26 -07:00