Commit Graph

206 Commits

Author SHA1 Message Date
junyulai
27e1316c33 Add cts test cases for NetworkCallback.onBlockedStatusChanged
Bug: 118862340
Test: atest HostsideNetworkCallbackTests

Change-Id: Ic19b3b648a94adf4449393beb9b30ad7a7dc2283
2019-03-22 19:17:01 +08:00
junyulai
d05db41eb7 Export API of listening for network change events in app2
Currently, due to foreground app will never get blocked by
NetworkPolicyManagerService, so onBlockedStatusChanged cannot be
tested under cts net app.

Thus, listen for network change events in app2 allows subsequent
tests on NetworkCallbacks.

Bug: 118862340
Test: m -j cts
Change-Id: I26ca370fc6ae4dd3f32ce6cf448bae83f3fbfbcc
2019-03-22 10:19:38 +08:00
Brett Chabot
44a06a7fbd Migrate remaining cts to androidx.test.
See go/jetpack-test-android-migration

Exempt-From-Owner-Approval: automated package name refactoring; already
reviewed+merged internally
Test: m cts

Change-Id: I6877435bf0436b8ef1dd252b225eac2908e78b71
Merged-In: I092c369229f8cb4c13827cbad4fd162622ac7849
2019-03-03 18:22:22 -08:00
Pavel Grafov
063552f8c9 Cleanup leftover commented code.
Test: builds
Bug: none
Change-Id: Ic14227d0ddccbd04e13c7a61197765eab2555cbe
2019-01-30 21:44:39 +00:00
Pavel Grafov
49e9a78dcb CTS test for VpnService.isAlwaysOn & .isLockdownEnabled.
Test cases that expect to get "true" returned are part of
devicepolicy tests since it is hard to set up always-on
configuration without device/profile owner.

Test: atest MixedDeviceOwnerTest#testAlwaysOnVpn
Test: atest HostsideVpnTests#testIsAlwaysOnIsLockdown
Bug: 72628179
Change-Id: I7fceab93a1d2d0255611f7a788391540e0dddccb
2019-01-30 18:50:15 +00:00
Irina Dumitrescu
3e84aa2e36 CTS test for setting HTTP proxy on a VPN network.
Bug: 76001058
Test: adb shell settings put global stay_on_while_plugged_in 7 && atest HostsideVpnTests
Change-Id: Ifa64d640f15bb68736b8c12f70e58a180bd80869
2019-01-24 19:10:21 +00:00
Juju Sung
46e3f1b3a5 Merge "Fix lowMemoryKill with app2.MyService" into pie-cts-dev
am: 86ca1697d0

Change-Id: Iee80963d4a158caab0892104ff0c4839e2490280
2018-12-25 00:21:50 -08:00
Juju Sung
62eb00af49 Fix lowMemoryKill with app2.MyService
MyForegroundService.java will change to background service during
testing,It’s ADJ will be 900. When run on a 512M project, it will
easily killed due to low memory.

Only set BIND_NOT_FOREGROUND and remove BIND_ALLOW_OOM_MANAGEMENT.
So MyForegroundService can still change process state between foreground
and background by startFround()/stopFround(). But it's ADJ will not too
high in background.

Bug: 120038371
Test: VTS, ran the test 5 times and it passed 5 times
Change-Id: I555366db7dd9904bc119bea94efbbe6422764f69
2018-12-25 08:07:26 +00:00
markchien
de0f268f78 Exempt adb socket for hostside VpnTest
Vpn test would destroy socket. If adb run over network, adb
socket would be killed during Vpn test. Then, test stop due to
adb disconnect.

Bug: 119382723
Test: - build pass
      - run cts -m CtsHostsideNetworkTests -t com.android.cts.net.HostsideVpnTests

Change-Id: I91b4ab018a9e7fc73dcb7969e4a6520d6b27d629
2018-11-22 20:39:46 +08:00
Jeff Vander Stoep
d502c99123 Refactor duplicate code into single function
Address comments in aosp/763607

Bug: 116053204
Test: atest ProcNetTest
Change-Id: Iec8b58b6499a7764b3757d4dd820e1f45a65e814
2018-09-28 10:36:12 -07:00
Jeff Vander Stoep
ff39f3fa71 Move tests requiring /proc/sys/net access to hostside
This access is going away for apps. Move these tests to hostside
tests to be executed by the shell domain.

Test: atest cts/hostsidetests/net/src/com/android/cts/net/ProcNetTest.java
Test: atest android.net.cts.ConnectivityManagerTest
Test: atest android.net.cts.IpSecSysctlTest
Test: atest android.net.cts.MultinetworkSysctlTest
Bug: 116053204
Change-Id: Id7e867184dd344a2d877515956e76019d627788b
2018-09-28 10:29:01 -07:00
Jeff Vander Stoep
ab53484d7b VpnTest: test getConnectionOwnerUid API
Test connection->UID resolution for both UDP and TCP connections.

Bug: 9496886
Bug: 109758967
Test: atest HostsideVpnTests
Change-Id: Ic17c64df74f65d788fd3d95a25af3c5b44946881
2018-09-18 15:40:32 -07:00
Sudheer Shanka
841d4711be Use a different key for signing networkpolicy test app.
One of the preparation steps for running cts involves loading up the sim
card with the key used to sign CtsCarrierApiTestCases.apk. It
means if the same key is used for signing networkpolicy test app too,
then the app is considered as carrier privileged by the system and can't
be forced into app standby state.

Fixes: 80077890
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests#testDataSaverMode_disabled

Change-Id: Iaa9f4fabe83430fa42b6f67c1025db41a5e1d938
2018-06-19 19:35:00 -07:00
Sudheer Shanka
cd670e7957 Update charge level too when turning battery off.
BATTERY_CHARGING which triggers the parole state
will only be sent if the level is > 90.

Change-Id: I1073e473c27eb5d29744f4a967771392729b4e1a
Fixes:80534062
Test: Verified that updating the level activates the parole mode.
2018-05-31 11:43:40 -07:00
Sudheer Shanka
4ca791b07b Merge "Update turnBatteryOff to include changing charging status too." into pi-dev 2018-05-23 01:42:05 +00:00
Sudheer Shanka
1b3cc387bf Update turnBatteryOff to include changing charging status too.
AppStandbyController is now listening to BatteryManager.ACTION_CHARGING
for starting parole state and this broadcast won't be sent immediately
after plugging in the device. So, update the charging status too which is
going to trigger this broadcast and parole state can be started
immediately.

Bug: 80109076
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: I6f19f7a509ec48e96eaea4b188262d5a9735edf1
2018-05-22 14:18:10 -07:00
Sudheer Shanka
926a3cb026 CtsHostsideNetworkTests: Skip unsupported tests.
If appStandby is not enabled, then
testAppIdleAndBatterySaver_tempPowerSaveWhitelists is not supported.

Fixes: 79942156
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: I2f4012ff2cf42481e089d7fc33930258e501ddbf
2018-05-22 13:10:50 -07:00
Sudheer Shanka
6dea1b7567 Set stable_charging_threshold app idle constant to 0 during tests.
Tests need the parole state to get started immediately after device
starts charging, so update stable_charging_threshold constant to 0.

Also simplify the logic to update the global setting as the tests only rely
on a couple of constants.

Fixes: 79319040
Test: Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests
Change-Id: Ie9ef67bb1544dd0179980d537365d13e6b6020c1
2018-05-08 15:02:37 -07:00
Sudheer Shanka
217aee2c9c Merge "Don't reset battery status before disabling battery saver mode." into pi-dev 2018-03-29 19:32:56 +00:00
Sudheer Shanka
6d389c2bfc Don't reset battery status before disabling battery saver mode.
Resetting battery status makes the "disabling battery saver mode"
operation that follows it a no-op if the device is plugged-in to power.
In this case, sticky battery saver status won't get reset and might
affect the tests following it.

Also, change back turnBatteryOff -> "cmd battery reset" since issue "72502904"
is fixed now.

Fixes: 77236363
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: I93e11c714200e8de6864a3bd7627eb66842a39d1
2018-03-29 10:29:16 -07:00
Sudheer Shanka
10864275fb Turn screen-on if needed, on every iteration network access is verified.
In some cases, we verify network connection is available to an app while
in foreground. If the app's foreground status is due to top activity, it
will lose the foreground status in case the screen goes off. So, turn
the screen-on while verifying for network connectivity.

Fixes: 71694434
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: Id1a49cedc2501859f73deead372afb7f6a41baac
2018-03-28 18:57:42 -07:00
Fyodor Kupolov
9636bf48f8 Allow cleartext traffic for the test app
Test: HostsideRestrictBackgroundNetworkTests
Bug: 75978847
Change-Id: I8962a0e30120ffb4e98b1fb661df277236715656
2018-03-22 15:19:52 -07:00
Sudheer Shanka
2bf68eba3a Update the battery charging status when turning battery on/off.
Bug: 72656089
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: Ida6d3ff4a78c91e656b49a26006603973753c808
2018-02-13 15:59:28 -08:00
Sudheer Shanka
dc134af7aa Update netpolicy tests to not assume DUT will be plugged-in.
Bug: 73037837
Bug: 72656089
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: I79aaaf083255626896901fcfdade70b4705cfc06
2018-02-10 15:43:59 -08:00
jdesprez
48f31fac64 Replace TestIdentifier by TestDescription
Large scale update of our test interface.

Test: build all targets
Bug: 70543295
Change-Id: I1600b8b950fe34bf4656e7769b8f7d3f365e3c0b
2018-02-07 16:37:13 -08:00
Dianne Hackborn
c565ba340d Merge "Fix issue #72116995: Add permission guarding Service#startForeground" 2018-01-24 17:58:49 +00:00
Sudheer Shanka
bc642d878e Fix netpolicy cts failures due to missing FLAG_ACTIVITY_NEW_TASK.
Bug: 72219677
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: I076e10b09f7d8a65120e62ed50afb2d326b62267
2018-01-22 19:28:21 -08:00
Dianne Hackborn
568c73dec2 Fix issue #72116995: Add permission guarding Service#startForeground
Bug: 72116995
Test: atest CtsAppTestCases
Change-Id: Idd6dc142fe327c2471455a29473d4b9048bd1f08
2018-01-21 19:57:12 -08:00
jdesprez
83fa03fb3f Use TestRuNResult and testResult from Tf not ddmlib
Test: build cts, cts unit tests
Bug: 70543295
Change-Id: I0a23e3cd8466623a32b01ba6b56d35478679645c
2018-01-20 06:41:02 -08:00
Sudheer Shanka
f54b3dd76a Update PROCESS_STATE_FOREGROUND_SERVICE constant value.
Bug: 71758358
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: Ia4509e94e33db5b61bf1aea704d25a199d381494
2018-01-11 12:44:58 -08:00
Sudheer Shanka
2afa7e6e4b Merge "Skip unsupported tests on low ram devices." into stage-aosp-oc-mr1-cts-dev am: e352866bee am: dfc9fb0901
am: 87c8dbbc39

Change-Id: Ie190f774998de77843b8af9ef25bbfef615c66bb
2018-01-03 20:42:05 +00:00
Sudheer Shanka
b7a503b578 Skip unsupported tests on low ram devices.
Notification listeners are not allowed on low ram devices.
Skip testDozeModeMetered_enabledButWhitelistedOnNotificationAction
and testDozeModeNonMetered_enabledButWhitelistedOnNotificationAction
on low ram devices since these tests depend on being able to
register notification listeners.

Bug: 70242457
Bug: 70545780
Test: testDozeModeMetered_enabledButWhitelistedOnNotificationAction
and testDozeModeNonMetered_enabledButWhitelistedOnNotificationAction
Change-Id: I8ce6f330760042ca790cd6fb10e62ebe86498a06
2017-12-21 11:23:21 -08:00
TreeHugger Robot
de2ef3bd4f Merge "Add cts suite tag to all CTS modules" 2017-12-16 14:11:49 +00:00
jdesprez
607948bfb0 Add cts suite tag to all CTS modules
Test: build
Bug: 65303193
Change-Id: I064459de5d4f8e958f41ac238cad35e5f7e99d3a
2017-12-16 04:19:31 -08:00
Paul Duffin
f183f746dd Add android.test.base/stubs dependency
In preparation for the removal of the non-junit classes in the
android.test.base library from the android.jar this adds a dependency
on android.test.base/stubs to ensure this code will continue to
compile.

The following change descriptions were generated automatically and so
may be a little repetitive. They are provided to give the reviewer
enough information to check the comments match what has actually been
changed and check the reasoning behind the changes.

* apps/CtsVerifier/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsVerifier's will need them in order to compile once its classes
    are removed from the test_current SDK on which it currently
    depends.

* common/device-side/util/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    compatibility-device-util's will need them in order to compile once
    its classes are removed from the current SDK on which it currently
    depends.

* hostsidetests/appsecurity/test-apps/AppAccessData/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsAppAccessData's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* hostsidetests/appsecurity/test-apps/AppWithData/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsAppWithData's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* hostsidetests/appsecurity/test-apps/DocumentClient/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsDocumentClient's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* hostsidetests/appsecurity/test-apps/EncryptionApp/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsEncryptionApp's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* hostsidetests/appsecurity/test-apps/ExternalStorageApp/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsExternalStorageApp's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* hostsidetests/appsecurity/test-apps/InstrumentationAppDiffCert/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsInstrumentationAppDiffCert's will need them in order to compile
    once its classes are removed from the current SDK on which it
    currently depends.

* hostsidetests/appsecurity/test-apps/MultiUserStorageApp/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsMultiUserStorageApp's will need them in order to compile once
    its classes are removed from the current SDK on which it currently
    depends.

* hostsidetests/appsecurity/test-apps/PrivilegedUpdateApp/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsPrivilegedUpdateTests's will need them in order to compile once
    its classes are removed from the current SDK on which it currently
    depends.

* hostsidetests/appsecurity/test-apps/ReadExternalStorageApp/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsReadExternalStorageApp's will need them in order to compile once
    its classes are removed from the current SDK on which it currently
    depends.

* hostsidetests/appsecurity/test-apps/SplitApp/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsSplitApp's will need them in order to compile once its classes
    are removed from the current SDK on which it currently depends.

    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsSplitAppDiffRevision's will need them in order to compile once
    its classes are removed from the current SDK on which it currently
    depends.

    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsSplitAppDiffVersion's will need them in order to compile once
    its classes are removed from the current SDK on which it currently
    depends.

    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsSplitAppDiffCert's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* hostsidetests/appsecurity/test-apps/StorageAppA/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsStorageAppA's will need them in order to compile once its
    classes are removed from the test_current SDK on which it currently
    depends.

* hostsidetests/appsecurity/test-apps/StorageAppB/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsStorageAppB's will need them in order to compile once its
    classes are removed from the test_current SDK on which it currently
    depends.

* hostsidetests/appsecurity/test-apps/StorageStatsApp/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsStorageStatsApp's will need them in order to compile once its
    classes are removed from the test_current SDK on which it currently
    depends.

* hostsidetests/appsecurity/test-apps/UsePermissionDiffCert/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsUsePermissionDiffCert's will need them in order to compile once
    its classes are removed from the current SDK on which it currently
    depends.

* hostsidetests/appsecurity/test-apps/UsesLibraryApp/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsUsesLibraryApp's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* hostsidetests/appsecurity/test-apps/WriteExternalStorageApp/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsWriteExternalStorageApp's will need them in order to compile
    once its classes are removed from the current SDK on which it
    currently depends.

* hostsidetests/appsecurity/test-apps/keysets/testApp/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsKeySetTestApp's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* hostsidetests/devicepolicy/app/AccountCheck/Auth/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsAccountCheckAuthApp's will need them in order to compile once
    its classes are removed from the test_current SDK on which it
    currently depends.

* hostsidetests/devicepolicy/app/AccountManagement/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsAccountManagementDevicePolicyApp's will need them in order to
    compile once its classes are removed from the current SDK on which
    it currently depends.

* hostsidetests/devicepolicy/app/CorpOwnedManagedProfile/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsCorpOwnedManagedProfile's will need them in order to compile
    once its classes are removed from the test_current SDK on which it
    currently depends.

    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsCorpOwnedManagedProfile2's will need them in order to compile
    once its classes are removed from the test_current SDK on which it
    currently depends.

* hostsidetests/devicepolicy/app/CustomizationApp/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsCustomizationApp's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* hostsidetests/devicepolicy/app/DelegateApp/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsDelegateApp's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* hostsidetests/devicepolicy/app/DeviceAdmin/api23/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsDeviceAdminApp23's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* hostsidetests/devicepolicy/app/DeviceAdmin/api24/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsDeviceAdminApp24's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* hostsidetests/devicepolicy/app/DeviceAdminService/package1/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsDeviceAdminService1's will need them in order to compile once
    its classes are removed from the current SDK on which it currently
    depends.

* hostsidetests/devicepolicy/app/DeviceAdminService/package2/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsDeviceAdminService2's will need them in order to compile once
    its classes are removed from the current SDK on which it currently
    depends.

* hostsidetests/devicepolicy/app/DeviceAdminService/package3/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsDeviceAdminService3's will need them in order to compile once
    its classes are removed from the current SDK on which it currently
    depends.

* hostsidetests/devicepolicy/app/DeviceAdminService/package4/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsDeviceAdminService4's will need them in order to compile once
    its classes are removed from the current SDK on which it currently
    depends.

* hostsidetests/devicepolicy/app/DeviceAdminService/packageb/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsDeviceAdminServiceB's will need them in order to compile once
    its classes are removed from the current SDK on which it currently
    depends.

* hostsidetests/devicepolicy/app/DeviceAndProfileOwner/api23/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsDeviceAndProfileOwnerApp23's will need them in order to compile
    once its classes are removed from the test_current SDK on which it
    currently depends.

* hostsidetests/devicepolicy/app/DeviceAndProfileOwner/api25/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsDeviceAndProfileOwnerApp25's will need them in order to compile
    once its classes are removed from the test_current SDK on which it
    currently depends.

* hostsidetests/devicepolicy/app/DeviceAndProfileOwner/latest/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsDeviceAndProfileOwnerApp's will need them in order to compile
    once its classes are removed from the test_current SDK on which it
    currently depends.

* hostsidetests/devicepolicy/app/DeviceOwner/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsDeviceOwnerApp's will need them in order to compile once its
    classes are removed from the test_current SDK on which it currently
    depends.

* hostsidetests/devicepolicy/app/IntentReceiver/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsIntentReceiverApp's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* hostsidetests/devicepolicy/app/IntentSender/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsIntentSenderApp's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* hostsidetests/devicepolicy/app/LauncherTests/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsLauncherAppsTests's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* hostsidetests/devicepolicy/app/ManagedProfile/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsManagedProfileApp's will need them in order to compile once its
    classes are removed from the test_current SDK on which it currently
    depends.

* hostsidetests/devicepolicy/app/PackageInstaller/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsPackageInstallerApp's will need them in order to compile once
    its classes are removed from the test_current SDK on which it
    currently depends.

* hostsidetests/devicepolicy/app/ProfileOwner/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsProfileOwnerApp's will need them in order to compile once its
    classes are removed from the test_current SDK on which it currently
    depends.

* hostsidetests/incident/apps/boundwidgetapp/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsAppWidgetApp's will need them in order to compile once its
    classes are removed from the test_current SDK on which it currently
    depends.

* hostsidetests/net/app/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsHostsideNetworkTestsApp's will need them in order to compile
    once its classes are removed from the current SDK on which it
    currently depends.

* hostsidetests/numberblocking/app/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsHostsideNumberBlockingAppTest's will need them in order to
    compile once its classes are removed from the current SDK on which
    it currently depends.

* hostsidetests/shortcuts/deviceside/backup/launcher1/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsShortcutBackupLauncher1's will need them in order to compile
    once its classes are removed from the current SDK on which it
    currently depends.

* hostsidetests/shortcuts/deviceside/backup/launcher2/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsShortcutBackupLauncher2's will need them in order to compile
    once its classes are removed from the current SDK on which it
    currently depends.

* hostsidetests/shortcuts/deviceside/backup/launcher3/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsShortcutBackupLauncher3's will need them in order to compile
    once its classes are removed from the current SDK on which it
    currently depends.

* hostsidetests/shortcuts/deviceside/backup/launcher4new/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsShortcutBackupLauncher4new's will need them in order to compile
    once its classes are removed from the current SDK on which it
    currently depends.

* hostsidetests/shortcuts/deviceside/backup/launcher4old/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsShortcutBackupLauncher4old's will need them in order to compile
    once its classes are removed from the current SDK on which it
    currently depends.

* hostsidetests/shortcuts/deviceside/backup/publisher1/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsShortcutBackupPublisher1's will need them in order to compile
    once its classes are removed from the current SDK on which it
    currently depends.

* hostsidetests/shortcuts/deviceside/backup/publisher2/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsShortcutBackupPublisher2's will need them in order to compile
    once its classes are removed from the current SDK on which it
    currently depends.

* hostsidetests/shortcuts/deviceside/backup/publisher3/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsShortcutBackupPublisher3's will need them in order to compile
    once its classes are removed from the current SDK on which it
    currently depends.

* hostsidetests/shortcuts/deviceside/backup/publisher4new/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsShortcutBackupPublisher4new's will need them in order to compile
    once its classes are removed from the current SDK on which it
    currently depends.

* hostsidetests/shortcuts/deviceside/backup/publisher4new_nobackup/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsShortcutBackupPublisher4new_nobackup's will need them in order
    to compile once its classes are removed from the current SDK on
    which it currently depends.

* hostsidetests/shortcuts/deviceside/backup/publisher4new_nomanifest/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsShortcutBackupPublisher4new_nomanifest's will need them in order
    to compile once its classes are removed from the current SDK on
    which it currently depends.

* hostsidetests/shortcuts/deviceside/backup/publisher4new_wrongkey/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsShortcutBackupPublisher4new_wrongkey's will need them in order
    to compile once its classes are removed from the current SDK on
    which it currently depends.

* hostsidetests/shortcuts/deviceside/backup/publisher4old/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsShortcutBackupPublisher4old's will need them in order to compile
    once its classes are removed from the current SDK on which it
    currently depends.

* hostsidetests/shortcuts/deviceside/backup/publisher4old_nomanifest/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsShortcutBackupPublisher4old_nomanifest's will need them in order
    to compile once its classes are removed from the current SDK on
    which it currently depends.

* hostsidetests/shortcuts/deviceside/multiuser/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsShortcutMultiuserTest's will need them in order to compile once
    its classes are removed from the current SDK on which it currently
    depends.

* hostsidetests/shortcuts/deviceside/upgrade/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsShortcutUpgradeVersion1's will need them in order to compile
    once its classes are removed from the current SDK on which it
    currently depends.

    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsShortcutUpgradeVersion2's will need them in order to compile
    once its classes are removed from the current SDK on which it
    currently depends.

* hostsidetests/ui/control/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsDeviceTaskSwitchingControl's will need them in order to compile
    once its classes are removed from the current SDK on which it
    currently depends.

* hostsidetests/usb/SerialTestApp/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsUsbSerialTestApp's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* hostsidetests/webkit/app/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsWebViewStartupApp's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* tests/ProcessTest/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    ProcessTests's will need them in order to compile once its classes
    are removed from the current SDK on which it currently depends.

* tests/acceleration/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsAccelerationTestCases's will need them in order to compile once
    its classes are removed from the current SDK on which it currently
    depends.

* tests/accessibility/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsAccessibilityTestCases's will need them in order to compile once
    its classes are removed from the test_current SDK on which it
    currently depends.

* tests/accessibilityservice/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsAccessibilityServiceTestCases's will need them in order to
    compile once its classes are removed from the test_current SDK on
    which it currently depends.

* tests/admin/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsAdminTestCases's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* tests/app/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsAppTestCases's will need them in order to compile once its
    classes are removed from the test_current SDK on which it currently
    depends.

* tests/backup/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsBackupTestCases's will need them in order to compile once its
    classes are removed from the test_current SDK on which it currently
    depends.

* tests/camera/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsCameraTestCases's will need them in order to compile once its
    classes are removed from the test_current SDK on which it currently
    depends.

* tests/fragment/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsFragmentTestCases's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* tests/sample/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsSampleDeviceTestCases's will need them in order to compile once
    its classes are removed from the current SDK on which it currently
    depends.

* tests/sensor/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    cts-sensors-tests's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* tests/tests/accounts/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsAccountManagerTestCases's will need them in order to compile
    once its classes are removed from the current SDK on which it
    currently depends.

* tests/tests/alarmclock/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsAlarmClockTestCases's will need them in order to compile once
    its classes are removed from the current SDK on which it currently
    depends.

* tests/tests/assist/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsAssistTestCases's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* tests/tests/bluetooth/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsBluetoothTestCases's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* tests/tests/calendarcommon/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsCalendarcommon2TestCases's will need them in order to compile
    once its classes are removed from the current SDK on which it
    currently depends.

* tests/tests/car/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsCarTestCases's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* tests/tests/contactsproviderwipe/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsContactsProviderWipe's will need them in order to compile once
    its classes are removed from the test_current SDK on which it
    currently depends.

* tests/tests/database/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsDatabaseTestCases's will need them in order to compile once its
    classes are removed from the test_current SDK on which it currently
    depends.

* tests/tests/display/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsDisplayTestCases's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* tests/tests/dpi/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsDpiTestCases's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* tests/tests/dpi2/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsDpiTestCases2's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* tests/tests/drm/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsDrmTestCases's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* tests/tests/externalservice/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsExternalServiceTestCases's will need them in order to compile
    once its classes are removed from the current SDK on which it
    currently depends.

* tests/tests/graphics/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsGraphicsTestCases's will need them in order to compile once its
    classes are removed from the test_current SDK on which it currently
    depends.

* tests/tests/location/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    cts-location-tests's will need them in order to compile once its
    classes are removed from the test_current SDK on which it currently
    depends.

    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsLocationTestCases's will need them in order to compile once its
    classes are removed from the test_current SDK on which it currently
    depends.

* tests/tests/mediastress/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsMediaStressTestCases's will need them in order to compile once
    its classes are removed from the current SDK on which it currently
    depends.

* tests/tests/midi/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsMidiTestCases's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* tests/tests/multiuser/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsMultiUserTestCases's will need them in order to compile once its
    classes are removed from the test_current SDK on which it currently
    depends.

* tests/tests/nativehardware/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    cts-nativehardware-tests's will need them in order to compile once
    its classes are removed from the current SDK on which it currently
    depends.

* tests/tests/netsecpolicy/usescleartexttraffic-false/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsNetSecPolicyUsesCleartextTrafficFalseTestCases's will need them
    in order to compile once its classes are removed from the current
    SDK on which it currently depends.

* tests/tests/netsecpolicy/usescleartexttraffic-true/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsNetSecPolicyUsesCleartextTrafficTrueTestCases's will need them
    in order to compile once its classes are removed from the current
    SDK on which it currently depends.

* tests/tests/netsecpolicy/usescleartexttraffic-unspecified/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsNetSecPolicyUsesCleartextTrafficUnspecifiedTestCases's will need
    them in order to compile once its classes are removed from the
    current SDK on which it currently depends.

* tests/tests/networksecurityconfig/networksecurityconfig-downloadmanager/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsNetSecConfigDownloadManagerTestCases's will need them in order
    to compile once its classes are removed from the current SDK on
    which it currently depends.

* tests/tests/networksecurityconfig/networksecurityconfig-resourcesrc/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsNetSecConfigResourcesSrcTestCases's will need them in order to
    compile once its classes are removed from the current SDK on which
    it currently depends.

* tests/tests/opengl/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsOpenGLTestCases's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* tests/tests/openglperf/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsOpenGlPerfTestCases's will need them in order to compile once
    its classes are removed from the current SDK on which it currently
    depends.

* tests/tests/packageinstaller/adminpackageinstaller/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsAdminPackageInstallerTestCases's will need them in order to
    compile once its classes are removed from the test_current SDK on
    which it currently depends.

* tests/tests/permission2/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsPermission2TestCases's will need them in order to compile once
    its classes are removed from the test_current SDK on which it
    currently depends.

* tests/tests/preference/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsPreferenceTestCases's will need them in order to compile once
    its classes are removed from the current SDK on which it currently
    depends.

* tests/tests/preference2/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsPreference2TestCases's will need them in order to compile once
    its classes are removed from the current SDK on which it currently
    depends.

* tests/tests/renderscript/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsRenderscriptTestCases's will need them in order to compile once
    its classes are removed from the current SDK on which it currently
    depends.

* tests/tests/rsblas/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsRsBlasTestCases's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* tests/tests/rscpp/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsRsCppTestCases's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* tests/tests/sax/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsSaxTestCases's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* tests/tests/selinux/selinuxTargetSdk/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsSelinuxTargetSdkTestCases's will need them in order to compile
    once its classes are removed from the current SDK on which it
    currently depends.

* tests/tests/selinux/selinuxTargetSdk2/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsSelinuxTargetSdk2TestCases's will need them in order to compile
    once its classes are removed from the current SDK on which it
    currently depends.

* tests/tests/shortcutmanager/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsShortcutManagerTestCases's will need them in order to compile
    once its classes are removed from the test_current SDK on which it
    currently depends.

* tests/tests/simpleperf/CtsSimpleperfDebugApp/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsSimpleperfDebugApp's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* tests/tests/telecom/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsTelecomTestCases's will need them in order to compile once its
    classes are removed from the test_current SDK on which it currently
    depends.

* tests/tests/telecom2/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsTelecomTestCases2's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* tests/tests/telecom3/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsTelecomTestCases3's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* tests/tests/telephony/preconditions/app/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsTelephonyPreparerApp's will need them in order to compile once
    its classes are removed from the current SDK on which it currently
    depends.

* tests/tests/text/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsTextTestCases's will need them in order to compile once its
    classes are removed from the test_current SDK on which it currently
    depends.

* tests/tests/theme/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsThemeDeviceTestCases's will need them in order to compile once
    its classes are removed from the current SDK on which it currently
    depends.

* tests/tests/tv/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsTvTestCases's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* tests/tests/uiautomation/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsUiAutomationTestCases's will need them in order to compile once
    its classes are removed from the test_current SDK on which it
    currently depends.

* tests/tests/uidisolation/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsUidIsolationTestCases's will need them in order to compile once
    its classes are removed from the current SDK on which it currently
    depends.

* tests/tests/voiceinteraction/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsVoiceInteractionTestCases's will need them in order to compile
    once its classes are removed from the current SDK on which it
    currently depends.

* tests/tests/voicesettings/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsVoiceSettingsTestCases's will need them in order to compile once
    its classes are removed from the current SDK on which it currently
    depends.

* tests/tests/wrap/nowrap/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsWrapNoWrapTestCases's will need them in order to compile once
    its classes are removed from the current SDK on which it currently
    depends.

* tests/tests/wrap/wrap_debug/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsWrapWrapDebugTestCases's will need them in order to compile once
    its classes are removed from the current SDK on which it currently
    depends.

* tests/tests/wrap/wrap_debug_malloc_debug/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsWrapWrapDebugMallocDebugTestCases's will need them in order to
    compile once its classes are removed from the current SDK on which
    it currently depends.

* tests/tests/wrap/wrap_nodebug/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsWrapWrapNoDebugTestCases's will need them in order to compile
    once its classes are removed from the current SDK on which it
    currently depends.

* tests/tvprovider/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsTvProviderTestCases's will need them in order to compile once
    its classes are removed from the current SDK on which it currently
    depends.

* tests/ui/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsUiDeviceTestCases's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* tests/video/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsVideoTestCases's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* tests/vr/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsVrTestCases's will need them in order to compile once its
    classes are removed from the test_current SDK on which it currently
    depends.

* tools/cts-device-info/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    CtsDeviceInfo's will need them in order to compile once its classes
    are removed from the SDK on which it currently depends.

* tools/cts-holo-generation/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsHoloGeneration's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* tools/cts-preconditions/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsPreconditions's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

* tools/cts-reference-app-lib/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    android.cts.refapp's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

Bug: 30188076
Test: make dist
Change-Id: I1d263c97b9009bad09cfea07f9c56fc0943ef203
2017-12-15 07:28:45 +00:00
Paul Duffin
35ff106cda Flatten dependency hierarchy of legacy-android-test
Previous changes statically included legacy-android-test in preparation
for removing android.test.* and junit.* classes from the android.jar.
Unfortunately, that lead to duplicate classes between APKs and the
bootclasspath which caused build problems (Proguard) and also runtime
problems (when targeting and running on older releases).

Switching from statically including the classes to using the runtime
libraries cannot be done in one step because legacy-android-test is
statically included in libraries which are used in many APKs and so
removing it from those libraries requires that all APKs be updated at
once. Doing that atomically across dozens of projects is not practical.

This change modifies APKS that statically include the
legacy-android-test library indirectly.

* If the APK manifest uses the android.test.runner library then the APK
  is modified to stop statically including legacy-android-test and
  instead build against android.test.base/mock/runner libraries instead.

* Otherwise, the APK statically includes legacy-android-test.

Also, any libraries that statically include are modified to stop
statically including it and if it has source dependencies on the classes
is changed to build against the android.test.base/mock/runner libraries.

The following change descriptions were generated automatically and so
may be a little repetitive. They are provided to give the reviewer
enough information to check the comments match what has actually been
changed and check the reasoning behind the changes.

* apps/CtsVerifier/Android.mk
    Removed legacy-android-test from LOCAL_JAVA_LIBRARIES because it is
    unnecessary as CtsVerifier's source does not depend on classes from
    legacy-android-test. The classes do not need to be statically
    included because the classes will be provided by the runtime,
    either from the default bootclasspath or from the
    android.test.runner library that CtsVerifier specifies in its
    manifest.

* common/device-side/device-info/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because compatibility-device-info is not a package so does not need
    to statically include the classes

    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    compatibility-device-info has a source dependency on its classes

* common/device-side/device-info/tests/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because compatibility-device-info-tests is not a package so does
    not need to statically include the classes

    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    compatibility-device-info-tests has a source dependency on its
    classes

* common/device-side/util/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because compatibility-device-util is not a package so does not need
    to statically include the classes

* hostsidetests/abioverride/app/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsAbiOverrideTestApp was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/appsecurity/test-apps/AccessSerialModern/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsAccessSerialModern was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/appsecurity/test-apps/DocumentClient/Android.mk
    Added 'android.test.runner.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsDocumentClient's source depends on its classes and because of
    these changes they are no longer present on the compilation path.
    The classes do not need to be statically included because the
    classes will be provided by the runtime, either from the default
    bootclasspath or from the android.test.runner library that
    CtsDocumentClient specifies in its manifest.

* hostsidetests/appsecurity/test-apps/DocumentProvider/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsDocumentProvider was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/appsecurity/test-apps/PermissionPolicy25/Android.mk
    Removed legacy-android-test from LOCAL_JAVA_LIBRARIES because it is
    unnecessary as CtsPermissionPolicyTest25's source does not depend
    on classes from legacy-android-test. The classes do not need to be
    statically included because the classes will be provided by the
    runtime, either from the default bootclasspath or from the
    android.test.runner library that CtsPermissionPolicyTest25
    specifies in its manifest.

* hostsidetests/appsecurity/test-apps/UsePermissionApp22/Android.mk
    Replaced 'legacy-android-test' with 'android.test.base' in
    LOCAL_JAVA_LIBRARIES because CtsUsePermissionApp22's source depends
    on its classes. The classes do not need to be statically included
    because the classes will be provided by the runtime, either from
    the default bootclasspath or from the android.test.runner library
    that CtsUsePermissionApp22 specifies in its manifest.

* hostsidetests/appsecurity/test-apps/UsePermissionApp23/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsUsePermissionApp23 was statically linked to it through its
    dependency on compatibility-device-util

    Removed legacy-android-test from LOCAL_JAVA_LIBRARIES because it is
    unnecessary as CtsUsePermissionApp23 already statically includes
    legacy-android-test

* hostsidetests/appsecurity/test-apps/UsePermissionApp25/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsUsePermissionApp25 was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/appsecurity/test-apps/UsePermissionApp26/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsUsePermissionApp26 was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/appsecurity/test-apps/UsePermissionAppLatest/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsUsePermissionAppLatest was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/devicepolicy/app/Assistant/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsDevicePolicyAssistApp was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/devicepolicy/app/CustomizationApp/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsCustomizationApp was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/devicepolicy/app/DeviceAndProfileOwner/api23/Android.mk
    Replaced 'legacy-android-test' with 'android.test.runner.stubs' in
    LOCAL_JAVA_LIBRARIES because CtsDeviceAndProfileOwnerApp23's source
    depends on its classes. The classes do not need to be statically
    included because the classes will be provided by the runtime,
    either from the default bootclasspath or from the
    android.test.runner library that CtsDeviceAndProfileOwnerApp23
    specifies in its manifest.

* hostsidetests/devicepolicy/app/DeviceAndProfileOwner/api25/Android.mk
    Replaced 'legacy-android-test' with 'android.test.runner.stubs' in
    LOCAL_JAVA_LIBRARIES because CtsDeviceAndProfileOwnerApp25's source
    depends on its classes. The classes do not need to be statically
    included because the classes will be provided by the runtime,
    either from the default bootclasspath or from the
    android.test.runner library that CtsDeviceAndProfileOwnerApp25
    specifies in its manifest.

* hostsidetests/devicepolicy/app/DeviceAndProfileOwner/latest/Android.mk
    Added 'android.test.runner.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsDeviceAndProfileOwnerApp's source depends on its classes and
    because of these changes they are no longer present on the
    compilation path. The classes do not need to be statically included
    because the classes will be provided by the runtime, either from
    the default bootclasspath or from the android.test.runner library
    that CtsDeviceAndProfileOwnerApp specifies in its manifest.

* hostsidetests/devicepolicy/app/WifiConfigCreator/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsWifiConfigCreator was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/dumpsys/apps/ProcStatsHelperApp/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsProcStatsHelperApp was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/media/app/MediaSessionTest/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsMediaSessionHostTestApp was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/net/app/Android.mk
    Added 'android.test.runner.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsHostsideNetworkTestsApp's source depends on its classes and
    because of these changes they are no longer present on the
    compilation path. The classes do not need to be statically included
    because the classes will be provided by the runtime, either from
    the default bootclasspath or from the android.test.runner library
    that CtsHostsideNetworkTestsApp specifies in its manifest.

* hostsidetests/os/test-apps/StaticSharedLibConsumerApp1/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsStaticSharedLibConsumerApp1 was statically linked to it through
    its dependency on compatibility-device-util

* hostsidetests/shortcuts/deviceside/backup/launcher1/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutBackupLauncher1 was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/shortcuts/deviceside/backup/launcher2/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutBackupLauncher2 was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/shortcuts/deviceside/backup/launcher3/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutBackupLauncher3 was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/shortcuts/deviceside/backup/launcher4new/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutBackupLauncher4new was statically linked to it through
    its dependency on compatibility-device-util

* hostsidetests/shortcuts/deviceside/backup/launcher4old/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutBackupLauncher4old was statically linked to it through
    its dependency on compatibility-device-util

* hostsidetests/shortcuts/deviceside/backup/publisher1/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutBackupPublisher1 was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/shortcuts/deviceside/backup/publisher2/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutBackupPublisher2 was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/shortcuts/deviceside/backup/publisher3/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutBackupPublisher3 was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/shortcuts/deviceside/backup/publisher4new/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutBackupPublisher4new was statically linked to it through
    its dependency on compatibility-device-util

* hostsidetests/shortcuts/deviceside/backup/publisher4new_nobackup/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutBackupPublisher4new_nobackup was statically linked to it
    through its dependency on compatibility-device-util

* hostsidetests/shortcuts/deviceside/backup/publisher4new_nomanifest/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutBackupPublisher4new_nomanifest was statically linked to
    it through its dependency on compatibility-device-util

* hostsidetests/shortcuts/deviceside/backup/publisher4new_wrongkey/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutBackupPublisher4new_wrongkey was statically linked to it
    through its dependency on compatibility-device-util

* hostsidetests/shortcuts/deviceside/backup/publisher4old/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutBackupPublisher4old was statically linked to it through
    its dependency on compatibility-device-util

* hostsidetests/shortcuts/deviceside/backup/publisher4old_nomanifest/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutBackupPublisher4old_nomanifest was statically linked to
    it through its dependency on compatibility-device-util

* hostsidetests/shortcuts/deviceside/multiuser/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutMultiuserTest was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/shortcuts/deviceside/upgrade/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutUpgradeVersion1 was statically linked to it through its
    dependency on compatibility-device-util

    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutUpgradeVersion2 was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/ui/appA/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsDeviceTaskSwitchingAppA was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/ui/appB/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsDeviceTaskSwitchingAppB was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/webkit/app/Android.mk
    Added 'android.test.runner.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsWebViewStartupApp's source depends on its classes and because of
    these changes they are no longer present on the compilation path.
    The classes do not need to be statically included because the
    classes will be provided by the runtime, either from the default
    bootclasspath or from the android.test.runner library that
    CtsWebViewStartupApp specifies in its manifest.

* libs/deviceutillegacy/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because ctsdeviceutillegacy is not a package so does not need to
    statically include the classes

    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    ctsdeviceutillegacy has a source dependency on its classes

* tests/JobScheduler/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    CtsJobSchedulerTestCases's source depends on its classes and
    because of these changes they are no longer present on the
    compilation path. The classes do not need to be statically included
    because the classes will be provided by the runtime, either from
    the default bootclasspath or from the android.test.runner library
    that CtsJobSchedulerTestCases specifies in its manifest.

* tests/JobScheduler/jobperm/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsJobSchedulerJobPerm was statically linked to it through its
    dependency on compatibility-device-util

* tests/JobScheduler/shareduid/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsJobSchedulerSharedUid was statically linked to it through its
    dependency on compatibility-device-util

* tests/admin/Android.mk
    Added 'android.test.runner.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsAdminTestCases's source depends on its classes and because of
    these changes they are no longer present on the compilation path.
    The classes do not need to be statically included because the
    classes will be provided by the runtime, either from the default
    bootclasspath or from the android.test.runner library that
    CtsAdminTestCases specifies in its manifest.

* tests/app/app2/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsAppTestStubsDifferentUid was statically linked to it through its
    dependency on compatibility-device-util

* tests/backup/app/fullbackup/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsFullBackupApp was statically linked to it through its dependency
    on compatibility-device-util

* tests/backup/app/keyvalue/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsKeyValueBackupApp was statically linked to it through its
    dependency on compatibility-device-util

* tests/framework/base/windowmanager/alertwindowservice/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsAlertWindowService was statically linked to it through its
    dependency on compatibility-device-util

* tests/leanbackjank/app/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsLeanbackJankApp was statically linked to it through its
    dependency on compatibility-device-util

* tests/tests/alarmclock/Android.mk
    Added 'android.test.runner.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsAlarmClockTestCases's source depends on its classes and because
    of these changes they are no longer present on the compilation
    path. The classes do not need to be statically included because the
    classes will be provided by the runtime, either from the default
    bootclasspath or from the android.test.runner library that
    CtsAlarmClockTestCases specifies in its manifest.

* tests/tests/assist/Android.mk
    Added 'android.test.runner.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsAssistTestCases's source depends on its classes and because of
    these changes they are no longer present on the compilation path.
    The classes do not need to be statically included because the
    classes will be provided by the runtime, either from the default
    bootclasspath or from the android.test.runner library that
    CtsAssistTestCases specifies in its manifest.

* tests/tests/dpi/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because android.cts.dpi is not a package so does not need to
    statically include the classes

    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    android.cts.dpi has a source dependency on its classes

* tests/tests/dpi2/Android.mk
    Removed legacy-android-test from LOCAL_JAVA_LIBRARIES because it is
    unnecessary as CtsDpiTestCases2's source does not depend on classes
    from legacy-android-test. The classes do not need to be statically
    included because the classes will be provided by the runtime,
    either from the default bootclasspath or from the
    android.test.runner library that CtsDpiTestCases2 specifies in its
    manifest.

* tests/tests/externalservice/service/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsExternalServiceService was statically linked to it through its
    dependency on compatibility-device-util

* tests/tests/mediastress/Android.mk
    Added 'android.test.runner.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsMediaStressTestCases's source depends on its classes and because
    of these changes they are no longer present on the compilation
    path. The classes do not need to be statically included because the
    classes will be provided by the runtime, either from the default
    bootclasspath or from the android.test.runner library that
    CtsMediaStressTestCases specifies in its manifest.

* tests/tests/openglperf/Android.mk
    Added 'android.test.runner.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsOpenGlPerfTestCases's source depends on its classes and because
    of these changes they are no longer present on the compilation
    path. The classes do not need to be statically included because the
    classes will be provided by the runtime, either from the default
    bootclasspath or from the android.test.runner library that
    CtsOpenGlPerfTestCases specifies in its manifest.

* tests/tests/provider/Android.mk
    Replaced 'legacy-android-test' with 'android.test.base' and
    'android.test.runner' in LOCAL_JAVA_LIBRARIES because
    CtsProviderTestCases's source depends on their classes. The classes
    do not need to be statically included because the classes will be
    provided by the runtime, either from the default bootclasspath or
    from the android.test.runner library that CtsProviderTestCases
    specifies in its manifest.

* tests/tests/selinux/selinuxTargetSdk/Android.mk
    Removed legacy-android-test from LOCAL_JAVA_LIBRARIES because it is
    unnecessary as CtsSelinuxTargetSdkTestCases's source does not
    depend on classes from legacy-android-test. The classes do not need
    to be statically included because the classes will be provided by
    the runtime, either from the default bootclasspath or from the
    android.test.runner library that CtsSelinuxTargetSdkTestCases
    specifies in its manifest.

* tests/tests/shortcutmanager/packages/launchermanifest/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutManagerLauncher1 was statically linked to it through its
    dependency on compatibility-device-util

    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutManagerLauncher2 was statically linked to it through its
    dependency on compatibility-device-util

    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutManagerLauncher3 was statically linked to it through its
    dependency on compatibility-device-util

* tests/tests/shortcutmanager/packages/launchermanifest_nonshared/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutManagerLauncher4 was statically linked to it through its
    dependency on compatibility-device-util

* tests/tests/shortcutmanager/packages/packagemanifest/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutManagerPackage1 was statically linked to it through its
    dependency on compatibility-device-util

    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutManagerPackage2 was statically linked to it through its
    dependency on compatibility-device-util

    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutManagerPackage3 was statically linked to it through its
    dependency on compatibility-device-util

* tests/tests/shortcutmanager/packages/packagemanifest_nonshared/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutManagerPackage4 was statically linked to it through its
    dependency on compatibility-device-util

* tests/tests/shortcutmanager/throttling/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutManagerThrottlingTest was statically linked to it
    through its dependency on compatibility-device-util

* tests/tests/voiceinteraction/Android.mk
    Added 'android.test.runner.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsVoiceInteractionTestCases's source depends on its classes and
    because of these changes they are no longer present on the
    compilation path. The classes do not need to be statically included
    because the classes will be provided by the runtime, either from
    the default bootclasspath or from the android.test.runner library
    that CtsVoiceInteractionTestCases specifies in its manifest.

* tests/tests/webkit/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    CtsWebkitTestCases's source depends on its classes and because of
    these changes they are no longer present on the compilation path.
    The classes do not need to be statically included because the
    classes will be provided by the runtime, either from the default
    bootclasspath or from the android.test.runner library that
    CtsWebkitTestCases specifies in its manifest.

* tests/ui/Android.mk
    Added 'android.test.runner.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsUiDeviceTestCases's source depends on its classes and because of
    these changes they are no longer present on the compilation path.
    The classes do not need to be statically included because the
    classes will be provided by the runtime, either from the default
    bootclasspath or from the android.test.runner library that
    CtsUiDeviceTestCases specifies in its manifest.

* tools/cts-reference-app-lib/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because android.cts.refapp is not a package so does not need to
    statically include the classes

    Added 'android.test.runner.stubs' to LOCAL_JAVA_LIBRARIES because
    android.cts.refapp has a source dependency on its classes

Bug: 30188076
Test: make checkbuild
Change-Id: Ief6940eacf333043e2324462d37d1fd35db15165
2017-12-07 07:38:54 +00:00
Amith Yamasani
1241e9aaf2 Test app standby APIs
Also revert a workaround for incorrect state in
AppIdleHistory.

Bug: 69867516
Bug: 63527785
Test: cts-tradefed run cts-dev -m CtsAppUsageHostTestCases

Change-Id: If3edb88f12d949ab78788e5ea27f0aee76cc4235
2017-12-01 13:55:54 -08:00
Sudheer Shanka
9198dd3580 Add a workaround to fix CtsHostsideNetworkTests.
Fixes: 68765448
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: Iea93416916cf2f700f48e69f269a8851c492efd7
2017-11-28 17:09:24 -08:00
Sudheer Shanka
719216aca9 Fix CtsHostsideNetworkTests.
Newly installed packages are now idle by default.

Fixes: 67585516
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: Ief06cec1c21bfdd85d1db6673479df2431affe61
2017-10-30 15:26:21 -07:00
Sudheer Shanka
ecf09e273d Merge "CtsHostsideNetworkTests: Add more logging when the test fails." into oc-mr1-dev am: e0c6f29d71
am: 3496ab978d

Change-Id: I942cad554e0f24406ba5c2d5d402a29ef400c817
2017-09-30 07:47:14 +00:00
Sudheer Shanka
21163bc32d CtsHostsideNetworkTests: Add more logging when the test fails.
Bug: 66015813
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: I1dc0603011522f73c63dcb7f0f1422428f727fad
2017-09-29 17:13:32 -07:00
Sudheer Shanka
502f28067d Merge "CtsHostsideNetworkTests: Add more logging when the test fails." into oc-mr1-dev am: 26e6bf91be
am: 09bab7b5c3

Change-Id: Ia1f48086e6e32923458778f187c7f8c9dfaf34ca
2017-09-27 21:11:29 +00:00
Sudheer Shanka
f23cf00410 CtsHostsideNetworkTests: Add more logging when the test fails.
Bug: 66015813
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: I8e04e061b949a44e6c63bc56eba9612311065a4d
2017-09-26 18:19:43 -07:00
Jeff Sharkey
242935cb85 Merge "Fix flaky CtsHostsideNetworkTests." into oc-mr1-dev am: 91b52b4043
am: be3000bc35

Change-Id: I6c7005cd424b42367c8576f107b9c1e98ecac2e4
2017-09-15 04:17:16 +00:00
Sudheer Shanka
459e28159c Fix flaky CtsHostsideNetworkTests.
'set metered-network' adb command is not blocking, it doesn't
wait for the network to be marked as metered. Updated test
to sleep and poll for metered status.

Bug: 64274313
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests \
      -t com.android.cts.net.HostsideRestrictBackgroundNetworkTests
Change-Id: Ide3e1633167979bdca912c1c299ad17d988b537e
2017-09-13 18:17:01 -07:00
Sudheer Shanka
d74aab502f Merge "Add extra logging when the test fails." into oc-mr1-dev am: 27547e6446
am: c7779d69ab

Change-Id: I16667b3b7346e56449cafc2ad00bed71598d318f
2017-09-09 00:46:22 +00:00
Sudheer Shanka
518999df34 Add extra logging when the test fails.
When the test fails, dump network_management and netpolicy
services to help in debugging.

Bug: 64274313
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests \
      -t com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: I76287de2c7cd6f394af9768a69e2c0fabba3be25
2017-09-07 15:36:08 -07:00
Sudheer Shanka
4418d66900 Merge "Add notification listener using the new shell command." into oc-mr1-dev am: a322dd9920
am: 0f3ddec924

Change-Id: Ibd07f1a78af3c705bdb10d79adcc1580deb8c5a6
2017-09-01 23:33:01 +00:00
Sudheer Shanka
46ec0e97b4 Add notification listener using the new shell command.
Adding notification listener by updating secure setting has
been deprecated.

Fixes: 65245599
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: I98dbff45bffed592cba2cd964f1a148450a1197d
2017-08-31 17:42:41 -07:00
Sudheer Shanka
4973a2119f Merge "Merge "Add location permission to netpolicy test app." into oc-mr1-dev am: 97cbea8559" into oc-mr1-dev-plus-aosp
am: 4e65b9608a

Change-Id: I999c157da7d004978e3ac51b917d5514eca011c7
2017-08-16 23:44:50 +00:00