Repackaging is now being done by the CTS signature tests that break if
they used the original classes from the shared libraries. This change
removes the repackaged.android.test... libraries.
Bug: 209607558
Test: cts/tests/signature/runSignatureTests.sh
Change-Id: I8745fc7b41099f9f15d76a4e9d7cf6b15e794b92
SPDX-license-identifier-GPL and SPDX-license-identifier-W3C are
false positives in the detector in binary files.
libs/usb/test/accessorytest/f_accessory.h is an original kernel
header file with GPL 2.0 license. Replace it with the file from
libs/usb/tests/AccessoryChat/accessorychat/linux/usb/f_accessory.h,
which is the same header after running it through bionic's script
to remove copyrightable information from the header.
Move CPL license into test-runner/ and test-base/ where it is
used.
Test: m checkbuild
Change-Id: I09e760d02b3712d5a8d225ce4cff6515c9f3c5e1
dist_group replaces owner and the default is going to change, set it
to the current default "android" for frameworks/base java_sdk_libraries.
Bug: 186723288
Test: m checkbuild
Change-Id: I1526853951bcffbe5c5aec6fbc6ba8e0dbea95ad
Merged-In: I1526853951bcffbe5c5aec6fbc6ba8e0dbea95ad
This allows soong to infer the package of the given srcs, which in turns
make it able to filter the inputs to metalava to exclude unwanted
packages.
This is part of a larger topic of changes intended to remove undesired
classes from the public documentation.
Bug: 187386774
Test: m
Change-Id: I8196c306b743ce6ca8a6452d212f3d7c0b5b2b82
Previously, the dependency was implicit by name. This change makes it
explicit.
The android.test.base-hiddenapi is renamed to prevent the implicit
dependency being discovered. A follow up change will remove that
capability from Soong.
Test: m droid
Verified that hiddenapi files (both aggregated ones and for the
individual modules) are not affected by this change.
Change-Id: I6fb96311e3a15cc341a0d64817921dd99d6e683e
The java_sdk_library modules are now added with 'default_to_stubs: true'
so that their impl libraries are not used even when the clients don't
have sdk_version property set.
This will allow us to replace the direct references to the stub
libraries of the java_sdk_library modules with the references to the
modules themselves (e.g. android.test.base.stubs -> android.test.base)
in many of the CTS tests without unintentionally exposing the private
APIs in the impl lib.
As part of the change, MockContentProvider.getIContentProviderBinder()
now returns an anonymous Binder object instead of throwing an exception.
This is to eliminate the need for clients to override the now
inaccessible method to escape from the exception.
Also, InstrumentationTestRunner.addTestListener method is added to the
stub because it is used by several tests (MtpServiceTests, etc.)
Bug: 157007292
Test: m
Merged-In: I14cf217f21fd3534c920c3a6336cf2d14c02e60c
(cherry picked from commit b4e458d1063a3ece9a7f539ed6dbaeb6fb9c495d)
Change-Id: I14cf217f21fd3534c920c3a6336cf2d14c02e60c
I8ea5421723a4a40d580956e5ceb51be70253f0eb has made the two APIs in the
class public (though as deprecated). We don't need to put them into the
greylist, which would make the hiddenapi tool uncomfortable.
Bug: 157007292
Test: m on qemu_trusty_arm64
Change-Id: Ibde3f44244fbe0e2c5da596eef05da57a6ee474a
android.test.runner is using AndroidTestCase.[set|get]TestContext
methods from android.test.base. The problem is that the methods are
internal APIs and this is preventing us from hiding the impl library of
android.test.base to others.
Marking those two methods as APIs.
Bug: 157007292
Test: m
Test: android.test.runner
Change-Id: I8ea5421723a4a40d580956e5ceb51be70253f0eb
In preparation for enabling API lint checking on java_sdk_library
adds lint-baseline.txt containing all the existing issues for these
APIs.
The test-base and test-runner APIs are old and have been deprecated
so there is little benefit in fixing those issues.
The test-mock API while old has not been deprecated and so should be
cleaned up. Bug 156175891 tracks that cleanup work.
Bug: 156126315
Bug: 156175891
Test: m checkapi
Change-Id: Ifb4669fcf7f2a36e5cb4d593bfc5d03330901ee9
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.
Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I547d7fb2e6bc2e9707bbc0d14dc1e8cd632c5a23
Merged-In: I547d7fb2e6bc2e9707bbc0d14dc1e8cd632c5a23
CtsAndroidTestBase27ApiSignatureTestCases to CtsAndroidTestBase28ApiSignatureTestCases
from TEST MAPPING file.
Reason: CtsAndroidTestBase27ApiSignatureTestCases has been renamed to
CtsAndroidTestBase28ApiSignatureTestCases, so correct this.
Bug: 129464829
Test: unittests.
Change-Id: I7e0184746c81f9564e67074c5d34d98fc2380317
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
Fixes up the android.test.legacy target to stop using sources directly
now that the issue with android.test.runner-minus-junit not being able
to be built against the SDK has been resolved.
Also, fixes a couple of comments.
This reverts commit 7d7af10dc9057a49c617c7c97c174e8b4ec5008c.
Reason for revert: When this was originally applied it broke the
pi-dev-plus-aosp branch as it contained references to these targets.
Those references have now been removed.
Bug: 63127064
Change-Id: I619e92faf4cc38f8fd4f053bde832e9a76a2a2bf
Test: make checkbuild
Fixes up the android.test.legacy target to stop using sources directly
now that the issue with android.test.runner-minus-junit not being able
to be built against the SDK has been resolved.
Also, fixes a couple of comments.
Bug: 63127064
Test: make checkbuild
Change-Id: If38fa0d87b36343896e97efb2269ac070810db84
Changes to the various api directories will run the
tests which make use of the API specification in those directories.
Could not include CtsSystemApiSignatureTestCases as it is broken on
git_master because of bug 116632058.
Bug: 123254057
Test: atest
Change-Id: I1fe4ca498cbd0393aba7cf4c1386a6325ace7937
The new format is described in tools/metalava/FORMAT.md.
Fixes: 116589402 Switch signature files over to the v2 format
Fixes: 112626813 Drop "synchronized" modifier from the signature format
Fixes: 122358225 Omit overriding methods that only differ in final [...]
Fixes: 73088715 API Review: Need doclava to output nullability
Fixes: 79739773 API Review: Metalava enforcing constants are constant
Exempt-From-Owner-Approval: Large-scale tooling change
Test: make sdk, make update-api, make checkapi
Change-Id: Ia248aece5250e84e47c815c601133b698bf644c2
The new format is described in tools/metalava/FORMAT.md.
Fixes: 116589402 Switch signature files over to the v2 format
Fixes: 112626813 Drop "synchronized" modifier from the signature format
Fixes: 122358225 Omit overriding methods that only differ in final [...]
Fixes: 73088715 API Review: Need doclava to output nullability
Fixes: 79739773 API Review: Metalava enforcing constants are constant
Exempt-From-Owner-Approval: Large-scale tooling change
Test: make sdk, make update-api, make checkapi
Change-Id: I8314f4e7099fa92e4f8ed7d283ccf836cc9a84a0
Merged-In: Ia248aece5250e84e47c815c601133b698bf644c2
RepetitiveTest class is added to public API in android.test.base
Bug: 110404779
Test: m -j
Change-Id: I80e772354c8cabf30ef513701cb7850590926dca
Merged-In: I80e772354c8cabf30ef513701cb7850590926dca
(cherry picked from commit 78db121770e6619661ff195f33ec0ff3673219f5)
android.test.base and android.test.runner libraries are changed to using
metalava instead of docalava
Bug: 119625999
Test: m -j
Change-Id: I589ea59240f8b5d442931a1f1b614221d9eaf221
The new property is added for supporting metalava. But some sdk library
cannot use metalava. So "metalava_enabled: false" is added to these
modules.
Test: make -j
Test: checkapi
Bug: 117127012
Merged-In: Ib65f3cd73dac0ac6ed64afeca6546d99739e4424
Change-Id: Ib65f3cd73dac0ac6ed64afeca6546d99739e4424
(cherry picked from commit 558e702be0eb2de76bb45303c99322561d73216c)
The new property is added for supporting metalava. But some sdk library
cannot use metalava. So "metalava_enabled: false" is added to these
modules.
Test: make -j
Test: checkapi
Bug: 117127012
Change-Id: Ib65f3cd73dac0ac6ed64afeca6546d99739e4424
android.test.* are built with java_sdk_library and api files are added
by running "make update-api".
android.test.base_static is created for allowing to use
android.test.base as a static library.
Bug:77577799
Test: make -j
Test: make checkapi
Test: make checkapi fails with a random change in the txt file
Test: adb shell cmd package list libraries |\
grep android.test.*
And check the android.test.* libraries
Merged-In: Ia27612657532e50b077a9c55dbef59ee3ec04b8a
Change-Id: Ia27612657532e50b077a9c55dbef59ee3ec04b8a
android.test.* are built with java_sdk_library and api files are added
by running "make update-api".
android.test.base_static is created for allowing to use
android.test.base as a static library.
Bug:77577799
Test: make -j
Test: make checkapi
Test: make checkapi fails with a random change in the txt file
Test: adb shell cmd package list libraries |\
grep android.test.*
And check the android.test.* libraries
Change-Id: Ia27612657532e50b077a9c55dbef59ee3ec04b8a
Adjust the build rules of android.test.*.stubs packages to also
produce a jar with dex files. This will be used by the `hiddenapi`
tool to categorize the boot class path equivalents as public API.
Bug: 79409988
Test: m android.test.base.stubs ; check javalib.jar contains dex
Merged-In: I1d0850b18044c559ea4b9893d929dc45884b32c3
Change-Id: Ief28cd5e6d0cdd58f22fab751e0173ccf8c69a0c
Adjust the build rules of android.test.*.stubs packages to also
produce a jar with dex files. This will be used by the `hiddenapi`
tool to categorize the boot class path equivalents as public API.
Bug: 79409988
Test: m android.test.base.stubs ; check javalib.jar contains dex
Change-Id: I1d0850b18044c559ea4b9893d929dc45884b32c3
Most jars don't need to be installed on the device. Instead of
using java_library and java_library_static to distinguish between
them make java_library and java_library_static identical and use
installable: true to identify the few jars that need to be dexed
and installed on the device.
Bug: 110885583
Test: m checkbuild
Change-Id: I579da7c1a712ec4fb49e288e7f3ab369cb75baf4
doclava was accidentally suppressing all these broken links
in @see tags. This CL fixes issues so we can start enfocing
checks for broken @see links.
Test: make docs
Bug: 80589960
Change-Id: I9c56841d9af111cb72e9a309bbe1bdcd31c80553
Bug: b/70351683
Test: m clean && m check-android-test-base-api
and compare the old and new stubs.jar using md5sum.
Change-Id: Ia9273016c4d3472888f970cbddf0ed85c0501eb3
android.test.legacy is now build against SDK, thus available to apps
build with SDK.
In doing so, android.test.mock.stubs had to be built with SDK (because
it is used by android.test.legacy). However, this wasn't trivial.
The problem was that some classes in test-mock implemented abstract
methods of platform classes. Even though they are marked as @hide,
doclava automatically emit them to the stub file because otherwise the
class in the stub file does not implement some abstract methods from its
parent class, which in turn makes the stub file non-compilable.
This CL solves the problem by introducing an adapter class in between
the class in test-mock and the class in the framework. The adapter class
implements abstract methods which are @hide and having reference to
types that aren't available to SDK. The abstract methods are removed
from the original class. Then doclava does not emit the abstract
methods.
Also by @hide'ing the adapter classes, they are not compiled when
building the stub library.
Bug: 30188076
Bug: 73339598
Test: m -j android.test.base
Test: m -j android.test.legacy
Test: m -j android.test.mock.stubs
are successful and do not show link-check warning
Merged-In: I8e432950e693ee3c6f0240852e62da6133d31571
Change-Id: I8e432950e693ee3c6f0240852e62da6133d31571