Switch android.test and junit classes to use UnsupportedAppUsage
The UnsupportedAppUsage annotations could not be added directly to the java files in src/ as they have to be built against the current api which does not include the annotation. Instead this uses the same technique as used for libcore/ojluni files and adds the annotations to stub files (in hiddenapi/src) which are built as part of the android.test.base-hiddenapi target. That target is added to a special whitelist in build/soong/java/config/config.go which causes the hiddenapi information to be extracted from the target. Also, updates the preupload check to prevent anymore entries being added to the config/hiddenapi-greylist.txt for android.test or junit classes. Bug: 73711752 Test: m cts-hiddenapi_flags-csv and check that it contained the correct entries even though they had been removed from config/hiddenapi-greylist.txt Change-Id: Ifaf15d2751f54cb03f8402b866a0ee4da7acc4d2
Showing
- config/hiddenapi-greylist.txt 0 additions, 6 deletionsconfig/hiddenapi-greylist.txt
- test-base/hiddenapi/Android.bp 29 additions, 0 deletionstest-base/hiddenapi/Android.bp
- test-base/hiddenapi/src/android/test/AndroidTestCase.java 46 additions, 0 deletionstest-base/hiddenapi/src/android/test/AndroidTestCase.java
- test-base/hiddenapi/src/android/test/InstrumentationTestCase.java 39 additions, 0 deletions...e/hiddenapi/src/android/test/InstrumentationTestCase.java
- test-base/hiddenapi/src/junit/framework/TestCase.java 46 additions, 0 deletionstest-base/hiddenapi/src/junit/framework/TestCase.java
- test-base/hiddenapi/src/junit/framework/TestSuite.java 58 additions, 0 deletionstest-base/hiddenapi/src/junit/framework/TestSuite.java
- tools/hiddenapi/exclude.sh 2 additions, 0 deletionstools/hiddenapi/exclude.sh
Loading
Please register or sign in to comment