Commit Graph

28385 Commits

Author SHA1 Message Date
Sudheer Shanka
ce96fa05a7 Recheck if the network state in expedited job is unexpected.
Unfortunately, this could happen if there is a delay in updating the
network rules for the app hosting the job.

Bug: 179319857
Test: atest tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Change-Id: I60cfd5c5946a4cd0ef5ebf0c1e56b0667cc3164d
Ignore-AOSP-First: Expedited jobs are not available in AOSP yet
2021-07-07 18:19:50 +00:00
Hungming Chen
59f422694a Dump the unused IPv4 BPF rule age correctly
Print a dash for the unused "lastUsed" of the rule.

The age should not equal the bootime if the rule has never been
updated the "lastUsed" field.

Format:
[inDstMac] iif(iface) src -> nat -> dst [outDstMac] age
[00:00:00:00:00:00] 14(rmnet0) 140.112.8.116:443
-> 30(30) 10.170.56.233:43720
-> 192.168.45.236:43720 [be:34:40:28:33:5f] -

Bug: 190783768
Test: dumpsys tethering
Original-Change: https://android-review.googlesource.com/1751022
Merged-In: Ie771becd2f72518cf02a86e5ae228315785752a5
Change-Id: Ie771becd2f72518cf02a86e5ae228315785752a5
2021-07-01 03:23:01 +00:00
Chiachang Wang
6339ec22ad Trigger the network score update after setting test allow bad wifi
Avoid bad wifi design has to apply in both wifi and cellular
networks. Cellular network should contain POLICY_YIELD_TO_BAD_WIFI
policy, then system default network could stay in the wifi after
wifi becomes unvalidated.

The testing API only update the value but not trigger the avoid
bad wifi callback to update the score in the existing cellular
network. Thus, if the cellular network is connected before
setting the overridden value, the yield to bad wifi policy will
not updated to cellular network. The system default network will
still switch from unvalidated wifi network to cellular network
even wifi network is connected with the avoid bad wifi policy.

Update to trigger a reevaluation to update the score in each
NetworkAgent in the ConnectivityService.

Bug: 192149168
Test: atest CtsNetTestCases:android.net.cts.ConnectivityManagerTest\
      #testSetAvoidUnvalidated --rerun-until-failure 100
Original-Change: https://android-review.googlesource.com/1751588
Merged-In: Ie0f777d0030b66dd306332496192c74f6c183284
Change-Id: Ie0f777d0030b66dd306332496192c74f6c183284
2021-07-01 00:32:08 +00:00
Paul Hu
eefacbcb5c Merge "Use appId instead of uid" into sc-dev 2021-06-30 09:38:26 +00:00
TreeHugger Robot
4fd9dfef2d Merge "Fix null PendingIntent in network listens" into sc-dev 2021-06-29 13:36:15 +00:00
Victor Chang
e4132c8ca0 Merge "Partial cherry-pick to remove IoUtils#deleteContents usage in FrameworksNetTests" into sc-dev 2021-06-29 08:12:04 +00:00
Paul Hu
dca7230c1d Use appId instead of uid
Multiple user's ares of mApps are not initialized in startMonitoring(),
so mApps.get(uid) of multi-user's app returns null in onPackageAdded().
As the result, permission of system uid is updated to "Network" and
any system application cannot use dedicated apn like IMS.
Using appId avoids this problem.

Bug: 168932048
Test: atest FrameworksNetTests

Signed-off-by: Sangcheol Lee <goodsc.lee@samsung.com>
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1733212
Merged-In: Ib8ea2185d8056bddb2ca5a8006f83afb3cffc9f4

Change-Id: Ib8ea2185d8056bddb2ca5a8006f83afb3cffc9f4
2021-06-29 16:07:54 +08:00
Remi NGUYEN VAN
4cb6189802 Fix null PendingIntent in network listens
In S ConnectivityService was changed to use getActiveRequest() to fill
EXTRA_NETWORK_REQUEST, but there is no active request in the case of
listens.

When getActiveRequest() is missing, use the first mRequest instead. This
should match previous behavior.

Bug: 191713869
Test: atest android.net.cts.ConnectivityManagerTest
Original-Change: https://android-review.googlesource.com/1748153
Merged-In: Id7343a4cc020aba16b7979b16334721c56b2839c
Change-Id: Id7343a4cc020aba16b7979b16334721c56b2839c
2021-06-29 07:07:28 +00:00
Remi NGUYEN VAN
64168015f1 Merge "Fix flakes in tests running after testIsPrivateDnsBroken" into sc-dev 2021-06-29 06:51:25 +00:00
Paul Duffin
4c94d16ced Merge "Enable tethering to perform its own hidden API processing" into sc-dev 2021-06-29 06:43:40 +00:00
Treehugger Robot
b91d44a64a Fix flakes in tests running after testIsPrivateDnsBroken
The test would not reconnect wifi after restoring the private DNS setting,
so validation would not be triggered, and it would remain identified as
having broken private DNS.

Reconnect wifi after the test to avoid affecting subsequent tests.

Original-Change: https://android-review.googlesource.com/1749560
Merged-In: Id9beba94e0fed85bd26c0509ad61369be794f3c3
Change-Id: Id9beba94e0fed85bd26c0509ad61369be794f3c3
Test: atest android.net.cts.ConnectivityManagerTest
Bug: 182296835
2021-06-29 04:04:07 +00:00
Paul Duffin
b28cb44e4b Enable tethering to perform its own hidden API processing
Previously, the hidden API encoding of the tethering boot dex jars,
i.e. those dex jars that tethering contributes to the bootclasspath
were done as part of the monolithic hidden API processing. This change
causes the encoding to be done by the tethering's
bootclasspath_fragment.

This change involves the following:
* Addition of the fragments property to the tethering's
  bootclasspath_fragment module to list all the other
  bootclasspath_fragment modules on which this depends.
* Addition of the additional_stubs property to add stubs for APIs that
  are not provided by another bootclasspath_fragment.
* Moving hidden API flag file entries related to tethering from the
  flag files in frameworks/base/boot/hiddenapi directory into the
  tethering directory with an appropriate OWNERS file to allow them to
  be managed by the Soong and compat team.
* Addition of a PREUPLOAD.cfg hook script to ensure that the flag files
  are sorted.

The build automatically checks that the hidden API flags which are
computed by tethering and encoded into its boot dex jars match those
that are generated by the monolithic processing so this is guaranteed
to be safe.

Bug: 179354495
Test: m com.android.tethering
      - ensure that the generated APEX is byte-for-byte identical
        before and after these changes.
      m out/soong/hiddenapi/hiddenapi-flags.csv
      - make sure that they are not changed by this.
Change-Id: I4d9621325c7fcea5043cbca4c577ba2ac6125c0c
Ignore-AOSP-First: merge conflicts
2021-06-28 23:41:38 +01:00
Remi NGUYEN VAN
819045fc60 Partial cherry-pick to remove IoUtils#deleteContents usage in FrameworksNetTests
It's a partial cherry-pick of https://r.android.com/1731232

Bug: 154796679
eest: atest ConnectivityCoverageTests
Merged-In: I5366e1cc9cd6ddb41f24718246381cc2b1cc1383
Change-Id: I23565c4144e665130585a86ce66cee6c2da07b60
2021-06-28 16:53:15 +01:00
Victor Chang
99c7bdb1a4 Merge "Remove usage of internal APIs from InetAddress and ServerSocket" into sc-dev 2021-06-28 14:17:12 +00:00
Victor Chang
6fae863801 Remove usage of internal APIs from InetAddress and ServerSocket
It affects the test only.

Bug: 154796679
Test: atest CtsNetTestCases
Merged-In: I77a419c459ee53b36d24f324ecab2b5dae5744de
Change-Id: I77a419c459ee53b36d24f324ecab2b5dae5744de
(cherry picked from commit ef88fadc2e)
2021-06-28 12:11:52 +01:00
Junyu Lai
4ad09c4a74 Check null NetworkSpecifier before redacting
Do null check before redacting, since NetworkSpecifier will not
always be attached. For example, NetworkSpecifier of wifi
network is only attached when a wifi network is created
in response to a network request with specifier attached.

Test: atest CtsNetTestCases:android.net.cts.ConnectivityManagerTest#testGetAllNetworkStateSnapshots \
      --rerun-until-failure 100
      (tested on cuttlefish mobile and wifi)
Bug: 191944987
Original-Change: https://android-review.googlesource.com/1747893
Merged-In: I5df3547995111fe6340facb94a577296d2228694
Change-Id: I5df3547995111fe6340facb94a577296d2228694
2021-06-28 01:22:42 +00:00
Nucca Chen
fadd7b7a33 Refresh conntrack entry timeout
Needed because the BPF maps offloads IPv4 traffic. The kernel can't
trace the offloaded traffic to keep the conntrack entry.

Bug: 190783768
Test: atest TetheringCoverageTests
Original-Change: https://android-review.googlesource.com/1566871
Merged-In: Idbcf686c9b2124b192944156ac5111be741744fb
Change-Id: Idbcf686c9b2124b192944156ac5111be741744fb
2021-06-26 08:48:52 +00:00
Nucca Chen
01785d7eff Clear IPv4 offload rules when tethering stopped
The condition for deleting IPv4 forwarding rules.
1. When the tethering client has gone, deletes the client and its
   rules.
2. When the upstream has gone, deletes all rules.
3. When the upstream has changed, deletes all rules.

Test: atest TetheringCoverageTests and check IPv4 offload rules
via dumpsys tethering in the following test cases.

Bug: 190783768

Test cases:
a. Loss upstream interface while tethering
  1. Enable WIFI tethering
  2. Disable upstream interface
  3. Check the rules are removed.
b. Loss downstream interfaces while tethering
  1. Enable WIFI tethering
  2. Enable BT tethering
  3. Disable BT tethering
  4. Check the BT tether rules are removed.
  5. Disable WIFI tethering
  6. Check the WIFI tether rules are removed.
c. Switch upstream interface while tethering
  1. Enable WIFI tethering
  2. Enable BT tethering
  3. Switch upstream interface from cellular to wifi.
  4. Check all rules are removed.
d. Enable NAT failure (manual)

Log:
The rule deletion in each case.
- IpServer#stopIPv4: case b and case d.
- BpfCoordinator#updateUpstreamNetworkState: case a and case c.

Test case a
06-23 09:58:59.245  [...] Tethering: [BpfCoordinator]
    updateUpstreamNetworkState tetherOffloadRule4Clear wlan2

Test case b
06-07 22:17:51.886  [..] Tethering: [bt-pan] cleanupUpstream bt-pan
06-07 22:17:51.888  [..] Tethering: [bt-pan] stopIPv4 bt-pan
06-07 22:18:23.769  [..] Tethering: [wlan2] cleanupUpstream wlan2
06-07 22:18:23.772  [..] Tethering: [wlan2] stopIPv4 wlan2

Test case c
06-08 11:11:48.277  [..] Tethering: [BpfCoordinator]
    updateUpstreamNetworkState tetherOffloadRule4Clear bt-pan
06-08 11:11:48.396  [..] Tethering: [BpfCoordinator]
    updateUpstreamNetworkState tetherOffloadRule4Clear wlan2
06-08 11:11:48.579  [..] Tethering: [wlan2] cleanupUpstreamInterface
    wlan2
06-08 11:11:48.808  [..] Tethering: [bt-pan] cleanupUpstreamInterface
    bt-pan

Enabling NAT failure
06-08 13:04:18.117  [..] Tethering: [wlan2] Exception enabling NAT [..]
06-08 13:04:18.234  [..] Tethering: [wlan2] cleanupUpstream wlan2
06-08 13:04:18.246  [..] Tethering: [wlan2] stopIPv4 wlan2

Original-Change: https://android-review.googlesource.com/1579873
Merged-In: Id505a3deb277bbe0f44403234d8ca8bbf01eec80
Change-Id: Id505a3deb277bbe0f44403234d8ca8bbf01eec80
2021-06-26 08:45:39 +00:00
Remi NGUYEN VAN
d5532eac04 Merge "Add back tethering to mainline-postsubmit" into sc-dev 2021-06-25 00:42:10 +00:00
Lorenzo Colitti
9d3a5ede58 Add CTS for BatteryStatsManager new API
Bug: 189308158
Test: This test and
      run testReportNetworkInterfaceForTransports
      with --rerun-until-failure 500
Original-Change: https://android-review.googlesource.com/1722770
Merged-In: I654b8920d6ea1dada782a618776b13870f7f98df
Change-Id: I654b8920d6ea1dada782a618776b13870f7f98df
2021-06-24 03:15:03 +00:00
Yan Yan
dfc9b497fd Merge "Test updating underlying network of IpSecTunnelInterface" into sc-dev 2021-06-24 01:05:26 +00:00
paulhu
342ee18b57 Add test for CSM#[get|set]UidsAllowedOnRestrictedNetworks
Bug: 185149952
Test: atest ConnectivityManagerTest
Original-Change: https://android-review.googlesource.com/1740740
Merged-In: Ie9391d9332ded58cf1e63c8c5c6f5ba85c950bc6

Change-Id: Ie9391d9332ded58cf1e63c8c5c6f5ba85c950bc6
2021-06-23 16:34:01 +00:00
Paul Hu
a244f13f21 Merge "Add ConnectivitySettingsManagerTest" into sc-dev 2021-06-23 16:29:20 +00:00
TreeHugger Robot
e7ac3ffec5 Merge changes I77dc5556,If772078c,Idb19b0f7 into sc-dev
* changes:
  Add test for CM#setAvoidUnvalidated
  Provide a way to override the avoid bad wifi configuration
  Remove ConnectivityServiceTest signature perms use
2021-06-23 16:16:03 +00:00
TreeHugger Robot
06b27811c8 Merge "Add basic tests for InvalidPacketException" into sc-dev 2021-06-23 16:09:25 +00:00
TreeHugger Robot
ac6a28907a Merge "Move ConnectivityDiagnosticsManagerTest to common" into sc-dev 2021-06-23 16:09:23 +00:00
paulhu
0903f73e1f Add ConnectivitySettingsManagerTest
- Add tests for ConnectivitySettingsManager.
- Also address leftover javadoc comments.

Bug: 182538166
Test: atest FrameworksNetTests
Test: atest CtsNetTestCases
Original-Change: https://android-review.googlesource.com/1738353
Merged-In: I8161c1bca84b41964578d59ee5d6ab07b2380707
Change-Id: I8161c1bca84b41964578d59ee5d6ab07b2380707
2021-06-23 20:02:27 +08:00
Chiachang Wang
79f6827d45 Add test for CM#setAvoidUnvalidated
Bug: 186061922
Test: atest CtsNetTestCases:android.net.cts.ConnectivityManagerTest
Test: atest CtsNetTestCasesLatestSdk
Original-Change: https://android-review.googlesource.com/1733789
Merged-In: I77dc5556458c2e824f7abd5a7b79e8aeed8dabf3
Change-Id: I77dc5556458c2e824f7abd5a7b79e8aeed8dabf3
2021-06-23 10:31:17 +00:00
Remi NGUYEN VAN
bdd448e641 Add basic tests for InvalidPacketException
The test simply verify the constructor. They only apply on S+ as
InvalidPacketException is not updatable before S.

Bug: 187935317
Test: atest InvalidPacketExceptionTest
Original-Change: https://android-review.googlesource.com/1742076
Merged-In: I33f1ee1702672204a46063e6e75c3880d5e7600b
Change-Id: I33f1ee1702672204a46063e6e75c3880d5e7600b
2021-06-23 09:16:59 +00:00
Remi NGUYEN VAN
b5f0819d35 Move ConnectivityDiagnosticsManagerTest to common
The tests are also useful in CTS to ensure that the
ConnectivityDiagnosticsManager class API is implemented properly
(including behavior of the DataStallReport class for example).

Bug: 187935317
Test: atest ConnectivityDiagnosticsManagerTest
Original-Change: https://android-review.googlesource.com/1742075
Merged-In: I86f39238054f43403f9a1e383dd2a935de84f06f
Change-Id: I86f39238054f43403f9a1e383dd2a935de84f06f
2021-06-23 09:16:53 +00:00
Chiachang Wang
fad30e3d84 Provide a way to override the avoid bad wifi configuration
ConnectivityManager.setAvoidUnvalidated only works if the
config_networkAvoidBadWifi configuration is set to 0 and the
NETWORK_AVOID_BAD_WIFI setting is unset. There is no easy way
for a testing app to temporary set a test value to verify the
behavior of the API. Thus, add a mechanism to allow test app
to set a period of time to temporary unstrict the resource
configuration, i.e. Temporary simulate config_networkAvoidBadWifi
configured to 0.

Bug: 186061922
Test: atest CtsNetTestCases FrameworksNetTests
Original-Change: https://android-review.googlesource.com/1733788
Merged-In: If772078c61a9b12926f104d5dfc9c9071e844732
Change-Id: If772078c61a9b12926f104d5dfc9c9071e844732
2021-06-23 08:42:47 +00:00
Remi NGUYEN VAN
ff55aeb916 Remove ConnectivityServiceTest signature perms use
To allow unit tests to run without platform certificates, remove
signature permission usage in ConnectivityServiceTest.

This mocks permission checks done in ConnectivityService for which the
test assumed that the permission was held, and mocks calls to
BatteryStatsManager. Calls to ActivityManagerService (through
PendingIntent) are done with shell permissions as the test uses real
PendingIntent mechanics.

Bug: 187935317
Test: atest FrameworksNetTests
Merged-In: If309d653ac2e9bbcf1b94bcee6336367289df359
Change-Id: If309d653ac2e9bbcf1b94bcee6336367289df359

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1736615

(cherry picked from commit 595dda3604)

Change-Id: Idb19b0f7cb87bb4d9de7a0b1a0e4128c2d6b9c6d
2021-06-23 08:39:38 +00:00
Remi NGUYEN VAN
109fd92b3d Add back tethering to mainline-postsubmit
Tethering was removed from mainline-postsubmit while Connectivity was
being added to it, but it can run in postsubmit again now.

If the runs are successful, it can be added to presubmit as well.

Ignore-AOSP-First: Partial revert of change that did not go to AOSP
Bug: 177290955
Test: TH needs to test postsubmit

Change-Id: I5d5dbccd8d14be573104947412a76578b2d7a6c1
2021-06-23 08:19:45 +00:00
Remi NGUYEN VAN
763f3a0fb3 Added tests for QosCallback
Tests for the newly added QosCallback functionality

Bug: 155176305
Test: Added to cts/NetworkAgentTest
Original-Change: https://android-review.googlesource.com/1558648
Merged-In: I29769fc8be074a5105bfe4ac34e30980c5f8744a
Change-Id: I29769fc8be074a5105bfe4ac34e30980c5f8744a
2021-06-23 07:15:31 +00:00
Remi NGUYEN VAN
3674367bcc Add tests for duplicate PendingIntent requests
Add tests for requestNetwork and registerNetworkCallback with
PendingIntents that are equal as per PendingIntent.intentFilterEquals.

In such situations, the first request is documented to be automatically
unregistered. This means that the PendingIntent should only be fired
once, instead of being fired for both requests.

Currently this behavior is broken for network callbacks (not for network
requests).

Test: atest ConnectivityManagerTest
Bug: 174237997
Original-Change: https://android-review.googlesource.com/1742073
Merged-In: Ic636c731c71474ef09043d7a26ccfd6e2bb5c39f
Change-Id: Ic636c731c71474ef09043d7a26ccfd6e2bb5c39f
2021-06-23 07:15:24 +00:00
Frank Li
e7d085e87d Ignore some ConnectivityManagerTest CTS tests that can't be run in the instant app mode
1. testIsPrivateDnsBroken: It requires the
   permission:android.permission.WRITE_SECURE_SETTINGS. But the
   WRITE_SECURE_SETTINGS permission can't be granted to instant
   apps.
2. testSetOemNetworkPreferenceForTestOnlyPref: Instant apps can't
   create test networks.
3. testSetOemNetworkPreferenceForTestPref: Instant apps can't
   create test networks.

Bug: 191678254
Bug: 191680108
Test: atest android.net.cts.ConnectivityManagerTest --instant
      atest CtsNetTestCasesLatestSdk:ConnectivityManagerTest --instant
Original-Change: https://android-review.googlesource.com/1743373
Merged-In: Ice43bcf7a1dc34f4a54fefba7f408767f0a4341e
Change-Id: Ice43bcf7a1dc34f4a54fefba7f408767f0a4341e
2021-06-23 02:24:55 +00:00
Remi NGUYEN VAN
7579035ac9 Merge "Initialize TetheringManager lazily" into sc-dev 2021-06-23 02:17:34 +00:00
Lorenzo Colitti
77fb999ed0 Merge changes from topic "connectivity-cts-cherrypicks" into sc-dev
* changes:
  Use assertEquals instead of assertTrue to compare the vpn type
  Add CTS for systemReady() & getIpSecNetIdRange()
  Call ConnectivitySettingsUtils to set/get private DNS related settings
  Add CTS for isUidNetworkingBlocked & isUidRestrictedOnMeteredNetworks
  Add test for CSM#[get|set]MobileDataPreferredUids
  Add test for setHttpProxyConfiguration
  CTS test for PacProxyManager
  Add test for CM#setAcceptUnvalidated
  Add test for CM#setAcceptPartialConnectivity
  Skip CaptivePortalTest for wearables
  Improve handling of invalid private DNS settings
2021-06-22 22:53:26 +00:00
Yan Yan
0271dc24ce Test updating underlying network of IpSecTunnelInterface
This CL adds tests to verify that after setting
IpSecTunnelInterface to use a different undelying network and
re-applying IpSecTransforms with matching addresses, traffic
can be routed to/from the new underlying network.

All these new tests will be skipped if SDK < S

Bug: 169855650
Test: atest IpSecManagerTunnelTest (new tests added)
Original-Change: https://android-review.googlesource.com/1488296
Merged-In: Iab26159e5e070574e552d62e4f0780059a51a9c7
Change-Id: Iab26159e5e070574e552d62e4f0780059a51a9c7
2021-06-22 20:44:14 +00:00
Treehugger Robot
3750a9f12e Add a test for ConnectivityFrameworkInitializer
The test verifies that system services were registered, meaning that
ConnectivityFrameworkInitializer.registerServiceWrappers ran
successfully on startup, and that calling it afterwards throws.

Bug: 171540887
Test: atest ConnectivityFrameworkInitializerTest
Original-Change: https://android-review.googlesource.com/1675598
Merged-In: I485b0dbd2e9dc557560a2b7bee2cff54c7f66c93
Change-Id: I485b0dbd2e9dc557560a2b7bee2cff54c7f66c93
2021-06-22 09:31:14 +00:00
Lucas Lin
da2a7c3daa Use assertEquals instead of assertTrue to compare the vpn type
Bug: 184261389
Test: atest CtsHostsideNetworkTests:HostsideVpnTests#testDefault
Original-Change: https://android-review.googlesource.com/1739093
Merged-In: I55371fabe0d2fa32a71520af11f18f1eeea31460
Change-Id: I55371fabe0d2fa32a71520af11f18f1eeea31460
2021-06-22 09:24:49 +00:00
Lucas Lin
03a1a97bf9 Add CTS for systemReady() & getIpSecNetIdRange()
Bug: 182963354
Test: 1. atest CtsNetTestCases:ConnectivityManagerTest
      2. atest CtsNetTestCasesLatestSdk:ConnectivityManagerTest
Original-Change: https://android-review.googlesource.com/1676425
Merged-In: I0b286f32389501402e552010546c62f3e56833d6
Change-Id: I0b286f32389501402e552010546c62f3e56833d6
2021-06-22 09:24:44 +00:00
Lucas Lin
611bc021e6 Call ConnectivitySettingsUtils to set/get private DNS related settings
ConnectivitySettingsManager and CtsNetUtils are doing the same
thing to set/get private DNS related settings.
To prevent making the duplication code in two places, move the
body to frameworks/libs/net and call it.

Bug: 185311744
Test: atest CtsNetTestCases CtsNetTestCasesLatestSdk
Original-Change: https://android-review.googlesource.com/1719017
Merged-In: I3272c825b86ec30c3d0bf4097088c653e668461b
Change-Id: I3272c825b86ec30c3d0bf4097088c653e668461b
2021-06-22 09:24:37 +00:00
Lucas Lin
77cb456671 Add CTS for isUidNetworkingBlocked & isUidRestrictedOnMeteredNetworks
BYPASS_INCLUSIVE_LANGUAGE_REASON=To make the change more clear,
fix the inclusive problem in a follow-up commit.
Bug: 176289731
Test: atest CtsHostsideNetworkTests:HostsideNetworkPolicyManagerTests
Original-Change: https://android-review.googlesource.com/1737395
Merged-In: Ie6bda8570979b10a28dbeb20f6db7a9c44735964
Change-Id: Ie6bda8570979b10a28dbeb20f6db7a9c44735964
2021-06-22 09:24:30 +00:00
Paul Hu
e4a2abad44 Add test for CSM#[get|set]MobileDataPreferredUids
Bug: 171872461
Test: atest ConnectivityManagerTest
Original-Change: https://android-review.googlesource.com/1736504
Merged-In: I43dfb049c271602526fa3e89ebb91219c7785a21
Change-Id: I43dfb049c271602526fa3e89ebb91219c7785a21
2021-06-22 09:24:24 +00:00
Treehugger Robot
34c8be9ac7 Add test for setHttpProxyConfiguration
The test verifies that system properties are set as expected by the
method.

Bug: 174436414
Test: atest ProxyTest
Original-Change: https://android-review.googlesource.com/1564956
Merged-In: Id15909c5e52f1042d7210cf7e416874bb01baee7
Change-Id: Id15909c5e52f1042d7210cf7e416874bb01baee7
2021-06-22 09:24:19 +00:00
Aaron Huang
1eb05790a2 CTS test for PacProxyManager
Bug: 181745786
Test: build CtsNetTestCases pass
      CtsNetTestCases:PacProxyManagerTest
      CtsNetTestCases:CaptivePortalTest
Original-Change: https://android-review.googlesource.com/1705131
Merged-In: I88cf3ecac12f4e8726d95a9b051e83eb719b0702
Change-Id: I88cf3ecac12f4e8726d95a9b051e83eb719b0702
2021-06-22 09:24:13 +00:00
Chiachang Wang
1981466747 Add test for CM#setAcceptUnvalidated
The always bit is verified in NetworkAgentTest. There is no easy
configuration to set an explicitly selected network to accept an
unvalidated network. Verify the accepted case also in
NetworkAgentTest.

Bug: 186061922
Test: atest CtsNetTestCases:android.net.cts.ConnectivityManagerTest
Test: atest CtsNetTestCasesLatestSdk
Original-Change: https://android-review.googlesource.com/1731234
Merged-In: I803eb975fb0b6c52d55b2310293bcad407d21f42
Change-Id: I803eb975fb0b6c52d55b2310293bcad407d21f42
2021-06-22 09:24:07 +00:00
Chiachang Wang
b9c9e07fe2 Add test for CM#setAcceptPartialConnectivity
Bug: 186061922
Test: atest CtsNetTestCases:android.net.cts.ConnectivityManagerTest
Test: atest CtsNetTestCasesLatestSdk
Original-Change: https://android-review.googlesource.com/1730545
Merged-In: Iba312defb6f02896eac518d71d36f1ef3df3d00b
Change-Id: Iba312defb6f02896eac518d71d36f1ef3df3d00b
2021-06-22 09:24:01 +00:00
Treehugger Robot
ecad16cf28 Skip CaptivePortalTest for wearables
Watch devices do not support Captive Portal connection

Bug: 189540750

Original-Change: https://android-review.googlesource.com/1727591
Merged-In: Iaf1a799d0cda1d7156fedcdab34184a52f351fbf
Change-Id: Iaf1a799d0cda1d7156fedcdab34184a52f351fbf
Test: run cts -m CtsNetTestCases -t android.net.cts.CaptivePortalTest#testCaptivePortalIsNotDefaultNetwork
2021-06-22 09:23:55 +00:00