Start warning on hidden API greylist
Insert checks into reflection, JNI and the verifier to print a warning when greylisted methods are invoked and fields accessed. We do this on actual access, because reflection allows to list all methods/fields and simply listing a greylisted member would print too many false positives. Issuing a warning also sets a boolean flag in Runtime. This will be made accessible through VMRuntime to the framework which will issue a Toast on Activity start. The change was tested with internal microbenchmarks of reflection and those flagged one issue. Microbenchmark invoking a field getter has regressed by 35%. We will profile this benchmark in detail and consider options for improvement. Bug b/72482474 was created to track progress. Test: art/test.py -b -r -t 674-hiddenapi Bug: 64382372 Bug: 72482474 Change-Id: I323244935e9091a2f8d012385cefaac6b1fe3777
Loading
Please sign in to comment