Add a python script to merge the CSV files, dealing with the fact that the
source columns may differ due to the annotation properties present in the
source.
Add this new file and the existing greylist.txt files as dependencies of
the 'dist' target, so that they appear as artifacts on the build server.
This allows them to be processed later by reading them from the build
server.
Test: m out/target/common/obj/PACKAGING/hiddenapi-greylist.csv
Bug: 117314178
Change-Id: Ib9e5da90e4c32333a3f4f02ee7f159f77086ae5e
This will contain greylist entries accessible by apps with a
targetSdkVersion of less than Q. Currently empty, will be populated in
follow up CLs.
For now, these APIs are just merged into the light greylist at build time,
pending support in the runtime for implementing the correct runtime
behavior.
Also fix a bug in sort_api.sh so it deals with empty API lists
correctly.
Bug: 115609023
Test: m
Change-Id: I213874062f393f96d120648a934ae5ad7aba93af
Checked the contents of the hiddenapi lists before and after the change
and the methods were definitely moved from light greylist to the
whitelist.
Flashed the device and checked the log and did not see anything out of
the ordinary.
Test: frameworks/base/tools/hiddenapi/generate_hiddenapi_lists_test.py
Change-Id: I9b4b2426251e99495f65ae02a3c2c32ce6966625
Grep exits with non-zero if it find no matches. But it doesn't matter in
this case, so just carry on.
Test: frameworks/base/tools/hiddenapi/sort_api.sh \
Test: frameworks/base/config/hiddenapi-light-greylist.txt
Change-Id: I7c219ee617f7dfa3cff5232ab979cc4ba38ebbfd
It is sometimes useful to add comments at the top of a source file. This
patch changes hidden API list generation to ignore lines beginning with
a hash.
Note that due to the sorting constraints on hidden API lists, comments
can be only at the top of the files.
Test: m appcompat
Change-Id: I1bc6fd44d1b1f10a5adc45093d7f7ed5a0c5a54f
We want to preserve the same semantics as P wrt dark greylist. This will
eventually become the "blacklist for target SDK >= P".
Bug: 113881436
Test: phone boots
Change-Id: I3bb72102e1d054eb0f2cae089ab633a0bc2bb276
Generating hidden API lists has grown in complexity and the original
Makefile rule has become a bottleneck for build times. Rewrite the
logic in Python.
Bug: 113278235
Bug: 73736106
Test: frameworks/base/tools/hiddenapi/generate_hiddenapi_lists_test.py
Change-Id: I63f03133d70260d06c55f482b844a4980dc6f734
It's moving to a new home under art/tools, since it is needed by
branches which don't include frameworks/base.
Bug: 110868826
Test: Build master-art branch
Change-Id: Ice8324db52ae1e7e2ac6734e45874a66de935c9a
Annotation was added with name @UnsupportedAppUsage after Android API
council discussion.
Bug: 110868826
Test: m class2greylist
Change-Id: I63ad61e97c5e8fdebfcead9e4ee5b060a60f97c7
This extracts signatures of methods that have the @UsedByApps annotation
for generating the greylist. It will be integrated into the build to
replace many members on greylist.txt.
Test: $ atest class2greylisttest
Bug: 110868826
Change-Id: Ifaf5859b60076c051de6be5a912ef70734330ce7
Check that they're sorted as expected and contain no duplicates.
The sort order now uses:
$ LC_COLLATE=C sort -f
So that non-alphanumeric characters are not ignored, giving a more
intuitive sort order. the '-f' means ignore case.
Also sort the existing lists accordingly.
Test: repo upload
Bug: 64382372
Merged-In: I52b884da33a9a46455df6747a215683d9d3c3218
Change-Id: Icc124fd8ceb3f001a9c11bbf40e0a111910c6b39
(cherry picked from commit e5dc64d4281dd9f38c2b585202e26ae4278fcfc5)