58 Commits

Author SHA1 Message Date
Paul Duffin
f404f1dbfc Remove repackaged.android.test... libraries
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
2022-02-03 15:56:56 +00:00
Colin Cross
c1309ecfba Fix incorrect licenses in frameworks/base
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
2022-01-11 19:23:50 -08:00
Colin Cross
5959ec0a5f Set dist_group: "android" for frameworks/base java_sdk_libraries
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
2021-06-03 16:42:11 +00:00
Anton Hansson
2e25fdc90f Use filegroups for test-{base,mock,runner} srcs
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
2021-05-10 12:41:01 +01:00
Paul Duffin
67668969e8 Add explicit dependency from android.test.base to hiddenapi annotations
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
2021-02-16 18:00:53 +00:00
Bob Badour
051ef786ac [LSC] Add LOCAL_LICENSE_KINDS to frameworks/base
Added SPDX-license-identifier-Apache-2.0 to:
  apct-tests/perftests/autofill/Android.bp
  apct-tests/perftests/blobstore/Android.bp
  apct-tests/perftests/core/Android.bp
  apct-tests/perftests/core/apps/overlay/Android.bp
  apct-tests/perftests/core/apps/reources_manager/Android.bp
  apct-tests/perftests/core/jni/Android.bp
  apct-tests/perftests/multiuser/Android.bp
  apct-tests/perftests/multiuser/apps/dummyapp/Android.bp
  apct-tests/perftests/packagemanager/Android.bp
  apct-tests/perftests/packagemanager/apps/query-all/Android.bp
  apct-tests/perftests/textclassifier/Android.bp
  apct-tests/perftests/utils/Android.bp
  apct-tests/perftests/windowmanager/Android.bp
  apex/Android.bp
  apex/blobstore/framework/Android.bp
  apex/blobstore/service/Android.bp
  apex/jobscheduler/framework/Android.bp
  apex/jobscheduler/service/Android.bp
  apex/media/Android.bp
  apex/media/aidl/Android.bp
  apex/media/framework/Android.bp
  cmds/am/Android.bp
  cmds/app_process/Android.bp
  cmds/appops/Android.bp
  cmds/appwidget/Android.bp
  cmds/backup/Android.bp
  cmds/bmgr/Android.bp
  cmds/bootanimation/Android.bp
  cmds/bu/Android.bp
  cmds/content/Android.bp
  cmds/dpm/Android.bp
  cmds/hid/Android.bp
  cmds/hid/jni/Android.bp
  cmds/idmap2/Android.bp
  cmds/ime/Android.bp
  cmds/incident/Android.bp
  cmds/incident_helper/Android.bp
  cmds/incidentd/Android.bp
  cmds/input/Android.bp
  cmds/interrupter/Android.bp
  cmds/locksettings/Android.bp
  cmds/pm/Android.bp
  cmds/requestsync/Android.bp
  cmds/screencap/Android.bp
  cmds/sm/Android.bp
  cmds/svc/Android.bp
  cmds/telecom/Android.bp
  cmds/uiautomator/Android.bp
  cmds/uiautomator/cmds/uiautomator/Android.bp
  cmds/uiautomator/instrumentation/Android.bp
  cmds/uiautomator/library/Android.bp
  cmds/vr/Android.bp
  cmds/wm/Android.bp
  config/Android.bp
  core/java/android/service/wallpaper/Android.bp
  core/jni/Android.bp
  core/sysprop/Android.bp
  core/tests/BroadcastRadioTests/Android.bp
  core/tests/ConnectivityManagerTest/Android.bp
  core/tests/PackageInstallerSessions/Android.bp
  core/tests/PlatformCompatFramework/Android.bp
  core/tests/bandwidthtests/Android.bp
  core/tests/benchmarks/Android.bp
  core/tests/bluetoothtests/Android.bp
  core/tests/bugreports/Android.bp
  core/tests/coretests/Android.bp
  core/tests/coretests/BinderDeathRecipientHelperApp/Android.bp
  core/tests/coretests/BinderProxyCountingTestApp/Android.bp
  core/tests/coretests/BinderProxyCountingTestService/Android.bp
  core/tests/coretests/BstatsTestApp/Android.bp
  core/tests/coretests/DisabledTestApp/Android.bp
  core/tests/coretests/EnabledTestApp/Android.bp
  core/tests/coretests/aidl/Android.bp
  core/tests/coretests/apks/Android.bp
  core/tests/coretests/apks/install/Android.bp
  core/tests/coretests/apks/install_bad_dex/Android.bp
  core/tests/coretests/apks/install_complete_package_info/Android.bp
  core/tests/coretests/apks/install_decl_perm/Android.bp
  core/tests/coretests/apks/install_jni_lib/Android.bp
  core/tests/coretests/apks/install_jni_lib_open_from_apk/Android.bp
  core/tests/coretests/apks/install_loc_auto/Android.bp
  core/tests/coretests/apks/install_loc_internal/Android.bp
  core/tests/coretests/apks/install_loc_sdcard/Android.bp
  core/tests/coretests/apks/install_loc_unspecified/Android.bp
  core/tests/coretests/apks/install_use_perm_good/Android.bp
  core/tests/coretests/apks/install_uses_feature/Android.bp
  core/tests/coretests/apks/install_verifier_bad/Android.bp
  core/tests/coretests/apks/install_verifier_good/Android.bp
  core/tests/coretests/apks/keyset/Android.bp
  core/tests/coretests/apks/locales/Android.bp
  core/tests/coretests/apks/overlay_config/Android.bp
  core/tests/coretests/apks/version/Android.bp
  core/tests/coretests/apks/version_nosys/Android.bp
  core/tests/featureflagtests/Android.bp
  core/tests/hdmitests/Android.bp
  core/tests/hosttests/test-apps/AutoLocTestApp/Android.bp
  core/tests/hosttests/test-apps/AutoLocVersionedTestApp_v1/Android.bp
  core/tests/hosttests/test-apps/AutoLocVersionedTestApp_v2/Android.bp
  core/tests/hosttests/test-apps/ExternalLocAllPermsTestApp/Android.bp
  core/tests/hosttests/test-apps/ExternalLocPermsFLTestApp/Android.bp
  core/tests/hosttests/test-apps/ExternalLocTestApp/Android.bp
  core/tests/hosttests/test-apps/ExternalLocVersionedTestApp_v1/Android.bp
  core/tests/hosttests/test-apps/ExternalLocVersionedTestApp_v2/Android.bp
  core/tests/hosttests/test-apps/ExternalSharedPerms/Android.bp
  core/tests/hosttests/test-apps/ExternalSharedPermsBT/Android.bp
  core/tests/hosttests/test-apps/ExternalSharedPermsDiffKey/Android.bp
  core/tests/hosttests/test-apps/ExternalSharedPermsFL/Android.bp
  core/tests/hosttests/test-apps/InternalLocTestApp/Android.bp
  core/tests/hosttests/test-apps/MultiDexLegacyTestServicesTests/Android.bp
  core/tests/hosttests/test-apps/NoLocTestApp/Android.bp
  core/tests/hosttests/test-apps/NoLocVersionedTestApp_v1/Android.bp
  core/tests/hosttests/test-apps/NoLocVersionedTestApp_v2/Android.bp
  core/tests/hosttests/test-apps/SharedUid/32/Android.bp
  core/tests/hosttests/test-apps/SharedUid/32/jni/Android.bp
  core/tests/hosttests/test-apps/SharedUid/64/Android.bp
  core/tests/hosttests/test-apps/SharedUid/64/jni/Android.bp
  core/tests/hosttests/test-apps/SharedUid/dual/Android.bp
  core/tests/hosttests/test-apps/SharedUid/dual/jni/Android.bp
  core/tests/hosttests/test-apps/SharedUid/java_only/Android.bp
  core/tests/hosttests/test-apps/SimpleTestApp/Android.bp
  core/tests/hosttests/test-apps/UpdateExtToIntLocTestApp_v1_ext/Android.bp
  core/tests/hosttests/test-apps/UpdateExtToIntLocTestApp_v2_int/Android.bp
  core/tests/hosttests/test-apps/UpdateExternalLocTestApp_v1_ext/Android.bp
  core/tests/hosttests/test-apps/UpdateExternalLocTestApp_v2_none/Android.bp
  core/tests/hosttests/test-apps/VersatileTestApp_Auto/Android.bp
  core/tests/hosttests/test-apps/VersatileTestApp_External/Android.bp
  core/tests/hosttests/test-apps/VersatileTestApp_Internal/Android.bp
  core/tests/hosttests/test-apps/VersatileTestApp_None/Android.bp
  core/tests/mockingcoretests/Android.bp
  core/tests/notificationtests/Android.bp
  core/tests/overlaytests/device/Android.bp
  core/tests/overlaytests/device/test-apps/AppOverlayOne/Android.bp
  core/tests/overlaytests/device/test-apps/AppOverlayTwo/Android.bp
  core/tests/overlaytests/device/test-apps/FrameworkOverlay/Android.bp
  core/tests/overlaytests/host/Android.bp
  core/tests/overlaytests/remount/Android.bp
  core/tests/overlaytests/remount/test-apps/Overlay/Android.bp
  core/tests/overlaytests/remount/test-apps/SharedLibrary/Android.bp
  core/tests/overlaytests/remount/test-apps/SharedLibraryOverlay/Android.bp
  core/tests/overlaytests/remount/test-apps/Target/Android.bp
  core/tests/packagemanagertests/Android.bp
  core/tests/privacytests/Android.bp
  core/tests/screenshothelpertests/Android.bp
  core/tests/systemproperties/Android.bp
  core/tests/utillib/Android.bp
  core/tests/utiltests/Android.bp
  core/tests/utiltests/jni/Android.bp
  core/tests/uwbtests/Android.bp
  core/xsd/Android.bp
  core/xsd/vts/Android.bp
  data/etc/Android.bp
  data/etc/car/Android.bp
  data/fonts/Android.bp
  data/keyboards/Android.mk
  drm/jni/Android.bp
  errorprone/Android.bp
  graphics/proto/Android.bp
  keystore/Android.bp
  keystore/tests/Android.bp
  libs/WindowManager/Jetpack/Android.bp
  libs/WindowManager/Shell/Android.bp
  libs/WindowManager/Shell/tests/Android.bp
  libs/androidfw/Android.bp
  libs/androidfw/fuzz/resourcefile_fuzzer/Android.bp
  libs/hostgraphics/Android.bp
  libs/incident/Android.bp
  libs/input/Android.bp
  libs/input/tests/Android.bp
  libs/protoutil/Android.bp
  libs/services/Android.bp
  libs/storage/Android.bp
  libs/usb/tests/AccessoryChat/Android.bp
  libs/usb/tests/AccessoryChat/accessorychat/Android.bp
  location/lib/Android.bp
  location/tests/Android.bp
  location/tests/locationtests/Android.bp
  lowpan/tests/Android.bp
  media/Android.bp
  media/java/Android.bp
  media/java/android/media/tv/tunerresourcemanager/Android.bp
  media/jni/Android.bp
  media/jni/audioeffect/Android.bp
  media/jni/soundpool/Android.bp
  media/jni/soundpool/tests/Android.bp
  media/lib/remotedisplay/Android.bp
  media/lib/signer/Android.bp
  media/lib/tvremote/Android.bp
  media/lib/tvremote/tests/Android.bp
  media/mca/filterfw/Android.bp
  media/mca/filterfw/native/Android.bp
  media/mca/filterpacks/Android.bp
  media/mca/samples/CameraEffectsRecordingSample/Android.bp
  media/mca/tests/Android.bp
  media/native/midi/Android.bp
  media/packages/BluetoothMidiService/Android.bp
  media/packages/BluetoothMidiService/tests/unit/Android.bp
  media/tests/AudioPolicyTest/Android.bp
  media/tests/CameraBrowser/Android.bp
  media/tests/EffectsTest/Android.bp
  media/tests/MediaDump/Android.bp
  media/tests/MediaFrameworkTest/Android.bp
  media/tests/MediaRouter/Android.bp
  media/tests/MtpTests/Android.bp
  media/tests/ScoAudioTest/Android.bp
  media/tests/SoundPoolTest/Android.bp
  media/tests/TunerTest/Android.bp
  media/tests/audiotests/Android.bp
  media/tests/players/Android.bp
  mime/Android.bp
  native/android/Android.bp
  native/graphics/jni/Android.bp
  native/webview/loader/Android.bp
  nfc-extras/Android.bp
  nfc-extras/tests/Android.bp
  packages/AppPredictionLib/Android.bp
  packages/BackupEncryption/Android.bp
  packages/BackupEncryption/test/robolectric-integration/Android.bp
  packages/BackupEncryption/test/robolectric/Android.bp
  packages/BackupEncryption/test/unittest/Android.bp
  packages/BackupRestoreConfirmation/Android.bp
  packages/CarSystemUI/Android.bp
  packages/CarrierDefaultApp/Android.bp
  packages/CarrierDefaultApp/tests/unit/Android.bp
  packages/CompanionDeviceManager/Android.bp
  packages/Connectivity/framework/Android.bp
  packages/Connectivity/service/Android.bp
  packages/CtsShim/Android.bp
  packages/CtsShim/build/Android.bp
  packages/CtsShim/build/jni/Android.bp
  packages/DynamicSystemInstallationService/Android.bp
  packages/DynamicSystemInstallationService/tests/Android.bp
  packages/EasterEgg/Android.bp
  packages/EncryptedLocalTransport/Android.bp
  packages/ExtShared/Android.bp
  packages/ExternalStorageProvider/Android.bp
  packages/ExternalStorageProvider/tests/Android.bp
  packages/FakeOemFeatures/Android.bp
  packages/FusedLocation/Android.bp
  packages/InputDevices/Android.bp
  packages/LocalTransport/Android.bp
  packages/PackageInstaller/Android.bp
  packages/PrintRecommendationService/Android.bp
  packages/PrintSpooler/Android.bp
  packages/PrintSpooler/jni/Android.bp
  packages/PrintSpooler/tests/outofprocess/Android.bp
  packages/SettingsLib/ActionBarShadow/Android.bp
  packages/SettingsLib/ActionButtonsPreference/Android.bp
  packages/SettingsLib/AdaptiveIcon/Android.bp
  packages/SettingsLib/Android.bp
  packages/SettingsLib/AppPreference/Android.bp
  packages/SettingsLib/BarChartPreference/Android.bp
  packages/SettingsLib/DisplayDensityUtils/Android.bp
  packages/SettingsLib/EntityHeaderWidgets/Android.bp
  packages/SettingsLib/HelpUtils/Android.bp
  packages/SettingsLib/LayoutPreference/Android.bp
  packages/SettingsLib/ProgressBar/Android.bp
  packages/SettingsLib/RadioButtonPreference/Android.bp
  packages/SettingsLib/RestrictedLockUtils/Android.bp
  packages/SettingsLib/SchedulesProvider/Android.bp
  packages/SettingsLib/SearchProvider/Android.bp
  packages/SettingsLib/SearchWidget/Android.bp
  packages/SettingsLib/SettingsSpinner/Android.bp
  packages/SettingsLib/SettingsTheme/Android.bp
  packages/SettingsLib/Tile/Android.bp
  packages/SettingsLib/Utils/Android.bp
  packages/SettingsLib/search/Android.bp
  packages/SettingsLib/tests/integ/Android.bp
  packages/SettingsLib/tests/robotests/Android.bp
  packages/SettingsProvider/Android.bp
  packages/SharedStorageBackup/Android.bp
  packages/Shell/Android.bp
  packages/Shell/tests/Android.bp
  packages/SimAppDialog/Android.bp
  packages/SoundPicker/Android.bp
  packages/StatementService/Android.bp
  packages/SystemUI/Android.bp
  packages/SystemUI/plugin/Android.bp
  packages/SystemUI/plugin/ExamplePlugin/Android.bp
  packages/SystemUI/plugin_core/Android.bp
  packages/SystemUI/shared/Android.bp
  packages/VpnDialogs/Android.bp
  packages/WAPPushManager/Android.bp
  packages/WAPPushManager/tests/Android.bp
  packages/WallpaperBackup/Android.bp
  packages/WallpaperCropper/Android.bp
  packages/overlays/Android.mk
  packages/overlays/tests/Android.bp
  packages/services/PacProcessor/Android.bp
  packages/services/PacProcessor/jni/Android.bp
  packages/services/Proxy/Android.bp
  proto/Android.bp
  rs/jni/Android.mk
  samples/demo/haptic-assessment/Android.bp
  sax/tests/saxtests/Android.bp
  services/Android.bp
  services/accessibility/Android.bp
  services/appprediction/Android.bp
  services/appwidget/Android.bp
  services/autofill/Android.bp
  services/backup/Android.bp
  services/backup/backuplib/Android.bp
  services/companion/Android.bp
  services/contentcapture/Android.bp
  services/contentsuggestions/Android.bp
  services/core/Android.bp
  services/core/java/com/android/server/vcn/Android.bp
  services/core/jni/Android.bp
  services/core/xsd/Android.bp
  services/core/xsd/vts/Android.bp
  services/coverage/Android.bp
  services/devicepolicy/Android.bp
  services/incremental/Android.bp
  services/midi/Android.bp
  services/net/Android.bp
  services/people/Android.bp
  services/print/Android.bp
  services/profcollect/Android.bp
  services/restrictions/Android.bp
  services/robotests/Android.bp
  services/robotests/backup/Android.bp
  services/systemcaptions/Android.bp
  services/tests/PackageManagerComponentOverrideTests/Android.bp
  services/tests/PackageManagerServiceTests/host/Android.bp
  services/tests/PackageManagerServiceTests/host/test-apps/Android.bp
  services/tests/mockingservicestests/Android.bp
  services/tests/rescueparty/Android.bp
  services/tests/servicestests/Android.bp
  services/tests/servicestests/aidl/Android.bp
  services/tests/servicestests/apks/Android.bp
  services/tests/servicestests/apks/install-split-base/Android.bp
  services/tests/servicestests/apks/install-split-feature-a/Android.bp
  services/tests/servicestests/apks/install_intent_filters/Android.bp
  services/tests/servicestests/apks/install_uses_sdk/Android.bp
  services/tests/servicestests/test-apps/ConnTestApp/Android.bp
  services/tests/servicestests/test-apps/JobTestApp/Android.bp
  services/tests/servicestests/test-apps/PackageParserApp/Android.bp
  services/tests/servicestests/test-apps/PackageParsingTestManifests/Android.bp
  services/tests/servicestests/test-apps/SimpleServiceTestApp/Android.bp
  services/tests/servicestests/test-apps/SuspendTestApp/Android.bp
  services/tests/shortcutmanagerutils/Android.bp
  services/tests/uiservicestests/Android.bp
  services/tests/wmtests/Android.bp
  services/usage/Android.bp
  services/usb/Android.bp
  services/voiceinteraction/Android.bp
  services/wifi/Android.bp
  startop/apps/test/Android.bp
  startop/iorap/Android.bp
  startop/iorap/functional_tests/Android.bp
  startop/iorap/stress/Android.bp
  startop/iorap/tests/Android.bp
  startop/view_compiler/Android.bp
  startop/view_compiler/dex_builder_test/Android.bp
  test-base/hiddenapi/Android.bp
  test-mock/Android.bp
  test-runner/tests/Android.bp
  tests/AccessibilityEventsLogger/Android.bp
  tests/AccessoryDisplay/common/Android.bp
  tests/AccessoryDisplay/sink/Android.bp
  tests/AccessoryDisplay/source/Android.bp
  tests/ActivityManagerPerfTests/stub-app/Android.bp
  tests/ActivityManagerPerfTests/test-app/Android.bp
  tests/ActivityManagerPerfTests/tests/Android.bp
  tests/ActivityManagerPerfTests/utils/Android.bp
  tests/ActivityTests/Android.bp
  tests/ActivityViewTest/Android.bp
  tests/AmSlam/Android.bp
  tests/ApkVerityTest/Android.bp
  tests/ApkVerityTest/ApkVerityTestApp/Android.bp
  tests/ApkVerityTest/block_device_writer/Android.bp
  tests/AppLaunch/Android.bp
  tests/AppLaunchWear/Android.bp
  tests/AppResourcesLoaders/Android.bp
  tests/AppResourcesLoaders/Overlay/Android.bp
  tests/Assist/Android.bp
  tests/AutoVerify/app1/Android.bp
  tests/AutoVerify/app2/Android.bp
  tests/AutoVerify/app3/Android.bp
  tests/AutoVerify/app4/Android.bp
  tests/BackgroundDexOptServiceIntegrationTests/Android.bp
  tests/BandwidthTests/Android.bp
  tests/BatteryWaster/Android.bp
  tests/BiDiTests/Android.bp
  tests/BlobStoreTestUtils/Android.bp
  tests/BootImageProfileTest/Android.bp
  tests/BrowserPowerTest/Android.bp
  tests/Camera2Tests/SmartCamera/SimpleCamera/jni/Android.bp
  tests/CameraPrewarmTest/Android.bp
  tests/Codegen/Android.bp
  tests/Compatibility/Android.bp
  tests/CoreTests/android/Android.bp
  tests/DataIdleTest/Android.bp
  tests/DozeTest/Android.bp
  tests/DpiTest/Android.bp
  tests/DynamicCodeLoggerIntegrationTests/Android.mk
  tests/FeatureSplit/base/Android.bp
  tests/FeatureSplit/feature1/Android.bp
  tests/FeatureSplit/feature2/Android.bp
  tests/FixVibrateSetting/Android.bp
  tests/FlickerTests/Android.bp
  tests/FlickerTests/test-apps/Android.bp
  tests/FlickerTests/test-apps/flickerapp/Android.bp
  tests/FrameworkPerf/Android.bp
  tests/GamePerformance/Android.bp
  tests/GridLayoutTest/Android.bp
  tests/HierarchyViewerTest/Android.bp
  tests/HugeBackup/Android.bp
  tests/HwAccelerationTest/Android.bp
  tests/Internal/Android.bp
  tests/JankBench/Android.bp
  tests/JobSchedulerPerfTests/Android.bp
  tests/JobSchedulerTestApp/Android.bp
  tests/LargeAssetTest/Android.bp
  tests/LegacyAssistant/Android.bp
  tests/LocalizationTest/Android.bp
  tests/LocationTracker/Android.bp
  tests/LotsOfApps/Android.bp
  tests/LowStorageTest/Android.bp
  tests/ManagedProfileLifecycleStressTest/Android.bp
  tests/ManagedProfileLifecycleStressTest/app/DummyDPC/Android.bp
  tests/MemoryUsage/Android.bp
  tests/MirrorSurfaceTest/Android.bp
  tests/NativeProcessesMemoryTest/Android.bp
  tests/NetworkSecurityConfigTest/Android.bp
  tests/NullHomeTest/Android.bp
  tests/OdmApps/Android.bp
  tests/OdmApps/app/Android.bp
  tests/OdmApps/priv-app/Android.bp
  tests/OneMedia/Android.bp
  tests/PackageWatchdog/Android.bp
  tests/PlatformCompatGating/Android.bp
  tests/PlatformCompatGating/test-rules/Android.bp
  tests/ProtoInputStreamTests/Android.bp
  tests/RemoteDisplayProvider/Android.bp
  tests/RenderThreadTest/Android.bp
  tests/RollbackTest/Android.bp
  tests/SerialChat/Android.bp
  tests/ServiceCrashTest/Android.bp
  tests/SharedLibrary/client/Android.bp
  tests/SharedLibrary/lib/Android.bp
  tests/ShowWhenLockedApp/Android.bp
  tests/SmokeTest/Android.bp
  tests/SmokeTest/tests/Android.bp
  tests/SmokeTestApps/Android.bp
  tests/SoundTriggerTestApp/Android.bp
  tests/Split/Android.bp
  tests/StagedInstallTest/Android.bp
  tests/StatusBar/Android.bp
  tests/SurfaceComposition/Android.bp
  tests/SurfaceControlViewHostTest/Android.bp
  tests/SystemMemoryTest/device/Android.bp
  tests/SystemMemoryTest/host/Android.bp
  tests/SystemUIDemoModeController/Android.bp
  tests/TaskOrganizerTest/Android.bp
  tests/TelephonyCommonTests/Android.bp
  tests/TouchLatency/Android.bp
  tests/TransformTest/Android.bp
  tests/TtsTests/Android.bp
  tests/UiBench/Android.bp
  tests/UsageReportingTest/Android.bp
  tests/UsageStatsPerfTests/Android.bp
  tests/UsageStatsTest/Android.bp
  tests/UsbHostExternalManagmentTest/AoapTestDevice/Android.bp
  tests/UsbHostExternalManagmentTest/AoapTestHost/Android.bp
  tests/UsbHostExternalManagmentTest/UsbHostExternalManagmentTestApp/Android.bp
  tests/UsbManagerTests/Android.bp
  tests/UsbManagerTests/lib/Android.bp
  tests/UsbTests/Android.bp
  tests/UsesFeature2Test/Android.bp
  tests/VectorDrawableTest/Android.bp
  tests/VoiceEnrollment/Android.bp
  tests/VoiceInteraction/Android.bp
  tests/WallpaperTest/Android.bp
  tests/WindowAnimationJank/Android.bp
  tests/WindowInsetsTests/Android.bp
  tests/appwidgets/AppWidgetHostTest/Android.bp
  tests/appwidgets/AppWidgetProviderTest/Android.bp
  tests/backup/Android.mk
  tests/benchmarks/Android.bp
  tests/libs-permissions/Android.bp
  tests/net/Android.bp
  tests/net/common/Android.bp
  tests/net/deflake/Android.bp
  tests/net/integration/Android.bp
  tests/net/jni/Android.bp
  tests/net/smoketest/Android.bp
  tests/notification/Android.bp
  tests/permission/Android.bp
  tests/privapp-permissions/Android.bp
  tests/testables/Android.bp
  tests/testables/tests/Android.bp
  tests/utils/StubIME/Android.bp
  tests/utils/hostutils/Android.bp
  tests/utils/testutils/Android.bp
  tests/vcn/Android.bp
  tools/aapt/Android.bp
  tools/aapt2/Android.bp
  tools/aapt2/integration-tests/AutoVersionTest/Android.bp
  tools/aapt2/integration-tests/BasicTest/Android.bp
  tools/aapt2/integration-tests/MergeOnlyTest/LeafLib/Android.mk
  tools/aapt2/integration-tests/MergeOnlyTest/LocalLib/Android.mk
  tools/aapt2/integration-tests/NamespaceTest/LibOne/Android.mk
  tools/aapt2/integration-tests/NamespaceTest/LibTwo/Android.mk
  tools/aapt2/integration-tests/StaticLibTest/App/Android.bp
  tools/aapt2/integration-tests/StaticLibTest/LibOne/Android.bp
  tools/aapt2/integration-tests/StaticLibTest/LibTwo/Android.bp
  tools/aapt2/integration-tests/SymlinkTest/Android.bp
  tools/bit/Android.bp
  tools/codegen/Android.bp
  tools/dump-coverage/Android.bp
  tools/incident_report/Android.bp
  tools/incident_section_gen/Android.bp
  tools/lock_agent/Android.bp
  tools/locked_region_code_injection/Android.bp
  tools/obbtool/Android.bp
  tools/powermodel/Android.bp
  tools/preload-check/Android.bp
  tools/preload-check/device/Android.bp
  tools/preload/loadclass/Android.bp
  tools/processors/staledataclass/Android.bp
  tools/processors/view_inspector/Android.bp
  tools/protologtool/Android.bp
  tools/sdkparcelables/Android.bp
  tools/split-select/Android.bp
  tools/streaming_proto/Android.bp
  tools/validatekeymaps/Android.bp
  wifi/java/Android.bp
  wifi/tests/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to:
  libs/hwui/Android.bp
  native/webview/plat_support/Android.bp
  obex/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
    SPDX-license-identifier-CC-BY SPDX-license-identifier-CPL-1.0
    SPDX-license-identifier-GPL SPDX-license-identifier-GPL-2.0
    SPDX-license-identifier-MIT SPDX-license-identifier-Unicode-DFS
    SPDX-license-identifier-W3C legacy_unencumbered
to:
  Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
    legacy_unencumbered
to:
  core/java/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-CPL-1.0
to:
  test-base/Android.bp
  test-runner/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-GPL
to:
  core/res/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-GPL-2.0
to:
  libs/usb/Android.bp
  libs/usb/tests/accessorytest/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT
to:
  tools/preload/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT
    SPDX-license-identifier-Unicode-DFS
to:
  api/Android.bp
  boot/Android.bp
  cmds/device_config/Android.bp
  cmds/settings/Android.bp
  core/api/Android.bp
  core/tests/coretests/certs/Android.bp
  core/tests/overlaytests/remount/test-apps/certs/Android.bp
  core/tests/overlaytests/remount/test-apps/overlaid_apex/Android.bp
  core/tests/overlaytests/remount/test-apps/overlay_apex/Android.bp
  libs/tracingproxy/Android.bp
  services/startop/Android.bp
  test-legacy/Android.mk
  tests/ApkVerityTest/testdata/Android.bp
  tests/TransitionTests/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work

Change-Id: Ic44d662936d1ff0cae7fbe915932b37aa4e4869a
Merged-in: I6e9103c3275cb2e6df5dc586588eccd7d2ab6b06
2021-02-16 04:09:57 -08:00
Stephan Linzner
d003197bc2 Update JavaDoc reference to AndroidX Test
Bug: 158760874
Change-Id: I689169ca449fa3ec26dfb2601dd4725804cfcaa7
2020-07-06 22:19:59 +00:00
Jiyong Park
912db8daaf Don't use impl lib of android.test.[mock|base|runners]
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
2020-06-26 09:42:06 +09:00
Jiyong Park
741bb5426b Remove AndroidTestCase from UnsupportedAppUsage
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
2020-06-09 12:37:37 +09:00
Jiyong Park
04f520d136 AndroidTestCase.[set|get]TestContext are added as APIs
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
2020-06-01 13:16:42 +09:00
Paul Duffin
ee5a4af4c5 Add lint-baseline.txt files for test base/runner/mock
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
2020-05-10 19:26:45 +01:00
Artur Satayev
54af4fc42a Use new UnsupportedAppUsage annotation.
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
2020-01-09 13:52:18 +00:00
Colin Cross
b8c97764d8 Merge "Remove legacy-performance-test-hostdex"
am: a0cdd72604

Change-Id: I4d83edab5297c2551da8a9b2a09dbd346298bd9a
2019-07-25 17:41:34 -07:00
Colin Cross
d665dc6d4c Remove legacy-performance-test-hostdex
The only user was removed.

Bug: 122332340
Test: m checkbuild
Change-Id: Ia937c04f171d6dfeff88a0c70a38cc87c900e0cc
2019-07-25 10:42:06 -07:00
Paul Duffin
48cce27632 Merge "Export some api files for use by cts/tests/signature tests" am: 0a45ac2928
am: b5d6cc540c

Change-Id: If5179d1403e99ac2008cfeb89046eb486263817c
2019-06-03 08:15:50 -07:00
Paul Duffin
cd35de3507 Export some api files for use by cts/tests/signature tests
Creates a filegroup for each of these files:
* api/current.txt
* api/system-current.txt
* api/system-removed.txt
* test-base/api/current.txt
* test-mock/api/current.txt
* test-runner/api/current.txt

Bug: 122332514
Test: atest -p cts/tests/signature
Change-Id: Ib031dcc39d3c1cca6dcdf977c0277d5e4875591e
2019-06-03 11:56:35 +01:00
easoncylee
36e70fbc7b Merge "CtsAndroidTestBase27ApiSignatureTestCases: Rename CtsAndroidTestBase27ApiSignatureTestCases to CtsAndroidTestBase28ApiSignatureTestCases from TEST MAPPING file." am: c232dbe4a2
am: f7b4b8a58c

Change-Id: I7c57808d9a34623d607b2d38af3221365d477045
2019-04-17 14:52:29 -07:00
easoncylee
62a569f9fb CtsAndroidTestBase27ApiSignatureTestCases: Rename
CtsAndroidTestBase27ApiSignatureTestCases to CtsAndroidTestBase28ApiSignatureTestCases
from TEST MAPPING file.

Reason: CtsAndroidTestBase27ApiSignatureTestCases has been renamed to
CtsAndroidTestBase28ApiSignatureTestCases, so correct this.

Bug: 129464829

Test: unittests.
Change-Id: I7e0184746c81f9564e67074c5d34d98fc2380317
2019-04-15 18:40:20 +08:00
Paul Duffin
ae3b4c44fb Merge "Switch android.test and junit classes to use UnsupportedAppUsage" am: 7bb0bcd305 am: b5ccf0e21c
am: d75f1793e6

Change-Id: I7a7c34980507393ec855c9e161ca0a922ed57fe4
2019-03-01 07:08:14 -08:00
Paul Duffin
997fa46197 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
2019-03-01 10:39:16 +00:00
Paul Duffin
eec4726e3c Merge "Revert "Revert "Remove legacy-test and legacy-android-test targets""" am: e051b0c95e am: 643318f4d2
am: a8025a851d

Change-Id: Ibe9fce04c43c435764c313f64bf49e03fa826012
2019-02-26 04:16:34 -08:00
Paul Duffin
79d7ba2773 Revert "Revert "Remove legacy-test and legacy-android-test targets""
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
2019-02-25 19:20:10 +00:00
Jakub Gielzak
e00505b90a Merge "Revert "Remove legacy-test and legacy-android-test targets"" am: 049c1589ee am: 7f997d4cfc
am: 95a9dc906f

Change-Id: I1034050336bdf8be84e3b86ae346dc4bfe1737ef
2019-02-18 10:51:09 -08:00
Jakub Gielzak
7d7af10dc9 Revert "Remove legacy-test and legacy-android-test targets"
This reverts commit 3b0be60307cc6063795f8cd32356745ee371e757.

Reason for revert: Broken build

Change-Id: I71270c7b47163ab7147029f2d3961d1848fdd9eb
2019-02-18 18:24:17 +00:00
Paul Duffin
0cc3064ada Merge "Remove legacy-test and legacy-android-test targets" am: 14daedf747 am: 4a83feb18a
am: 9248379c98

Change-Id: Ia409c6c4596269120386f8ae47d7f6379a1073bf
2019-02-18 07:44:41 -08:00
Paul Duffin
3b0be60307 Remove legacy-test and legacy-android-test targets
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
2019-02-15 10:08:35 +00:00
Paul Duffin
2ac4d5cc03 Merge "Add TEST_MAPPING for api specifications" am: 6bb71b0322 am: cd2586709b
am: 17abc1fd96

Change-Id: I76724e470d2de7b34900a5d21b6dd3b24ee6124d
2019-02-08 04:26:35 -08:00
Paul Duffin
507cbc4e58 Add TEST_MAPPING for api specifications
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
2019-02-06 13:57:42 +00:00
Tor Norbye
68ea0c3c13 Update signature files to the new format
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
2019-01-19 12:07:50 -08:00
Tor Norbye
8752dedb76 Update signature files to the new format
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
2019-01-19 07:22:55 -08:00
Sundong Ahn
8b444f63b7 Add public API
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)
2019-01-16 19:26:54 +09:00
Sundong Ahn
78db121770 Add public API
RepetitiveTest class is added to public API in android.test.base

Bug: 110404779
Test: m -j
Change-Id: I80e772354c8cabf30ef513701cb7850590926dca
2019-01-16 12:19:20 +09:00
Sundong Ahn
485577cb78 Merge "Switch to metalava" am: f53c398133 am: d1eae3244e
am: 78a6782dbb

Change-Id: If6bd8a784514916f4fd47c186c0b9bbf04329be6
2018-12-12 21:28:08 -08:00
Sundong Ahn
26420f6345 Switch to metalava
android.test.base and android.test.runner libraries are changed to using
metalava instead of docalava

Bug: 119625999
Test: m -j
Change-Id: I589ea59240f8b5d442931a1f1b614221d9eaf221
2018-12-12 18:38:46 +09:00
Sundong Ahn
ccf9672f64 Add the metalava_enabled property
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)
2018-10-04 14:27:37 +09:00
Sundong Ahn
558e702be0 Add the metalava_enabled property
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
2018-10-02 01:50:09 +00:00
Sundong Ahn
e933cedf83 Build android.test.* with java_sdk_library
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
2018-08-29 12:22:59 +09:00
Sundong Ahn
f24779c8c7 Build android.test.* with java_sdk_library
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
2018-08-16 12:16:28 +09:00
David Brazdil
6e3c86c8ed Merge "Compile android.test.*.stubs into dex" 2018-07-11 09:18:15 +00:00
Colin Cross
a977a37c85 Merge "Mark installable jars with installable: true" am: 1035f48f61 am: 19609a7993
am: c7f9e053ec

Change-Id: I5934f14ced4a89fa234d75fde733aae1f102cc7a
2018-07-10 09:45:03 -07:00
David Brazdil
89c6432dbf Compile android.test.*.stubs into dex
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
2018-07-10 13:37:05 +00:00
David Brazdil
a2c457fd2a Compile android.test.*.stubs into dex
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
2018-07-10 14:34:52 +01:00
Colin Cross
a12c0f506c Mark installable jars with installable: true
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
2018-06-27 11:49:44 -07:00
Aurimas Liutikas
dc309f26f8 Fix broken links in @see tags in framework docs.
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
2018-06-05 14:44:30 -07:00
Nan Zhang
3fece48098 Migrate android.test.base.stubs generation to Soong.
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
2018-04-13 14:55:16 -07:00
Treehugger Robot
919ff2268b Merge changes I8e432950,Id325b8cf
* changes:
  Build android.test.base/legacy against SDK
  Fix visibility issues with android.test.mock.stubs
2018-02-22 13:39:10 +00:00
Paul Duffin
4cdec67417 Build android.test.base/legacy against SDK
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
2018-02-21 15:59:56 +00:00
Paul Duffin
2d86c7a4c7 Turn on DepAnn for test-base and test-runner
Bug: 30188076
Test: m -j20 RUN_ERROR_PRONE=true android.test.base android.test.runner
Change-Id: I735e3fbfcc710f1dc1b96e04f91b9feda8727b6c
2018-02-16 15:40:24 +00:00
Tobias Thierer
2bbf12aa78 Merge "Pin jarjar targets to java_version 1.8." 2018-02-07 00:16:04 +00:00
Paul Duffin
f24612b176 Correct inaccurate comments in build files
Bug: 30188076
Test: make checkbuild
Change-Id: I3881e66a949bfc5fbc34db0a104ef7a6995abe35
2018-02-06 13:38:44 +00:00