11b67b201adb173d5f6f1b7a3fd337fda91e200f |
|
18-Jan-2018 |
David Brazdil <dbrazdil@google.com> |
Set up a test for hidden API enforcement Submitting the test first for easier review. The expected outcome is that all currently class members are discoverable and accessible. Future CLs will implement the enforcement and change the expected outcome. The test itself has two JARs - parent declares classes and child tries to access them using reflection, JNI and static linking. The test driver ("Main" class) loads these JARs as follows: (a) both with class loaders (b) parent in boot class path, child with class loader (c) both in boot class path In (a), there should be no enforcement as the JAR does not have hidden API access flags (would not load otherwise). In situation(b), child should only be allowed to access parent's public, non-hidden members. And in (c), parent contains hidden API access flags but child is exempt from access checks. Bug: 64382372 Test: art/test.py -b -r -t 674-hiddenapi Change-Id: I19f5f7c30c0c7913703209817d36006b161c6778
|