Commit Graph

11685 Commits

Author SHA1 Message Date
Treehugger Robot
68f8081aae Merge "[VCN21.1] Verify capability is not added if specifier is present" am: 20d9f4722e am: 82e910ecc5
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1705134

Change-Id: Iefa25664714ee187be4ddc4359afcd0968ab4ecf
2021-05-18 09:56:05 +00:00
Mark Chien
2d577ad3d2 Merge "Check whether feature is enabled by compare with apex version" am: 84a8a13a92 am: c59d6fa12d
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1708088

Change-Id: Id993424e895917267ac5ffa43ab3362169c1d37c
2021-05-18 09:56:00 +00:00
Treehugger Robot
82e910ecc5 Merge "[VCN21.1] Verify capability is not added if specifier is present" am: 20d9f4722e
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1705134

Change-Id: Iae49fd663e9b90e935b9065ef60561f2b4c55439
2021-05-18 09:36:16 +00:00
Treehugger Robot
20d9f4722e Merge "[VCN21.1] Verify capability is not added if specifier is present" 2021-05-18 08:35:06 +00:00
Mark Chien
c59d6fa12d Merge "Check whether feature is enabled by compare with apex version" am: 84a8a13a92
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1708088

Change-Id: Iefbd6fa6a061614b83d115219f8939dee8794bb7
2021-05-18 03:37:13 +00:00
Mark Chien
84a8a13a92 Merge "Check whether feature is enabled by compare with apex version" 2021-05-18 03:09:20 +00:00
junyulai
f15fb56f73 [VCN21.1] Verify capability is not added if specifier is present
Test: atest NetworkRequestTest#testBypassingVcn
Bug: 176939355
Change-Id: I3fdd7a08ac9fd667633b68dc935abce024dd3a4d
2021-05-17 07:03:53 +00:00
Mark Chien
726b814899 Merge "Test mts against last stable api level" am: a59a146b36 am: 9015e276aa
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1686012

Change-Id: I34e9a66e7d603fe71c5ee1591787344e245b70ac
2021-05-14 10:03:22 +00:00
Mark Chien
9015e276aa Merge "Test mts against last stable api level" am: a59a146b36
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1686012

Change-Id: I51562dc48242c7d2f2f53f7f9fe7b5797e945ede
2021-05-14 09:36:00 +00:00
Mark Chien
a59a146b36 Merge "Test mts against last stable api level" 2021-05-14 09:00:11 +00:00
markchien
a3ef48117f Check whether feature is enabled by compare with apex version
Replace the isFeatureEnabled function which is check with apex version.

Bug: 187946226
Test: Set device config flag and check the result
Change-Id: Iba44a01e2fdd0698dcb338ea4a8fe8147cbaa7dd
2021-05-14 16:56:33 +08:00
Treehugger Robot
ad56a81b2d Merge "Re-enable check for VpnTransportInfo session ID." am: 6748f93e56 am: c7ea77ce6a
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1705135

Change-Id: If5ab413d6cea71a3dcc98634d7ad8a11fbd2bbd1
2021-05-14 06:25:15 +00:00
Treehugger Robot
c7ea77ce6a Merge "Re-enable check for VpnTransportInfo session ID." am: 6748f93e56
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1705135

Change-Id: I0de41fe2ba6d2bc691b5693a81da368ae5e0e025
2021-05-14 06:10:30 +00:00
Treehugger Robot
6748f93e56 Merge "Re-enable check for VpnTransportInfo session ID." 2021-05-14 05:58:35 +00:00
Treehugger Robot
0d5000dbbd Merge "Don't run testRequestBackgroundNetwork in instant app mode" am: 3531b188ce am: e7bb625eaf
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1695289

Change-Id: Iec0e338d556495c7a2e14b273d8fefad31983dd8
2021-05-14 04:53:58 +00:00
Treehugger Robot
e7bb625eaf Merge "Don't run testRequestBackgroundNetwork in instant app mode" am: 3531b188ce
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1695289

Change-Id: Ib447d41a24fedf2b23881653c23674f526a37c65
2021-05-14 04:37:49 +00:00
Treehugger Robot
3531b188ce Merge "Don't run testRequestBackgroundNetwork in instant app mode" 2021-05-14 04:09:43 +00:00
Nucca Chen
76cc470496 Merge "bpf: Add interface index to BPF devmap" am: aa10ddfa6f am: 72bd34e343
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1703125

Change-Id: I8ed82b1f5b8fa35e398c6d8c3bc928a03ee6318c
2021-05-14 03:01:16 +00:00
Junyu Lai
d1c8af2783 Merge "[SP32.3] No-op refactoring of OffloadControllerTest" am: 4ec15d5d71 am: b8c3c59504
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1683006

Change-Id: I436b4a50f672bf6ea84b41efc973135b41b20f5e
2021-05-14 03:01:10 +00:00
Nucca Chen
72bd34e343 Merge "bpf: Add interface index to BPF devmap" am: aa10ddfa6f
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1703125

Change-Id: Ic4bcba98c1f1e43314a0a9797b427fee4bb0c20e
2021-05-14 02:46:15 +00:00
Junyu Lai
b8c3c59504 Merge "[SP32.3] No-op refactoring of OffloadControllerTest" am: 4ec15d5d71
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1683006

Change-Id: I97fba52572d7244106b3ee3770431939804dbc5a
2021-05-14 02:46:08 +00:00
Nucca Chen
aa10ddfa6f Merge "bpf: Add interface index to BPF devmap" 2021-05-14 02:45:38 +00:00
Junyu Lai
4ec15d5d71 Merge "[SP32.3] No-op refactoring of OffloadControllerTest" 2021-05-14 02:18:12 +00:00
Mark Chien
3d4f367a25 Merge "Fix some TetheringCoverageTest failure" am: 08b89743de am: bf74c05038
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1699426

Change-Id: I8d522afdf7e1b9ec26fbd4f491f7b95e9ccfecc6
2021-05-13 16:22:01 +00:00
Mark Chien
bf74c05038 Merge "Fix some TetheringCoverageTest failure" am: 08b89743de
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1699426

Change-Id: Id3b14e197d1cd42a2a0dfa4c4c7cef2d052cbf9c
2021-05-13 16:00:40 +00:00
Lorenzo Colitti
8f67bdec5a Re-enable check for VpnTransportInfo session ID.
This check was commented out because VpnTransportInfo was not
correctly propagated to ConnectivityService. This is now fixed.

Bug: 183938194
Test: atest CtsNetTestCases:NetworkAgentTest
Change-Id: Iab9987c8b58487ee44d8479b02e030c7e1e4465f
2021-05-14 00:47:55 +09:00
Mark Chien
08b89743de Merge "Fix some TetheringCoverageTest failure" 2021-05-13 15:46:02 +00:00
Junyu Lai
80ccb96458 Merge "No-op Refactoring of startTrackDefaultNetwork" am: 7fecf6a017 am: 784f54eefb
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1697371

Change-Id: Ieda8a53749f35b5585488a1a6bd5e20b7891e75d
2021-05-13 15:06:56 +00:00
Junyu Lai
784f54eefb Merge "No-op Refactoring of startTrackDefaultNetwork" am: 7fecf6a017
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1697371

Change-Id: I3a03e19384ba021aa176f681e7b288f5bde59638
2021-05-13 14:51:34 +00:00
Junyu Lai
7fecf6a017 Merge "No-op Refactoring of startTrackDefaultNetwork" 2021-05-13 14:32:00 +00:00
Chiachang Wang
3fea4fa064 Merge "Add test for ConnectivityManager.setGlobalProxy()" am: 78c1663ba3 am: 650927c734
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1688272

Change-Id: Id68f9718dedfdc294bda304c99e1d84281497e2c
2021-05-13 10:07:37 +00:00
Chiachang Wang
650927c734 Merge "Add test for ConnectivityManager.setGlobalProxy()" am: 78c1663ba3
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1688272

Change-Id: Iaf40a7004a6305ad86b985695bfe4a9ee9038c96
2021-05-13 09:44:29 +00:00
Chiachang Wang
78c1663ba3 Merge "Add test for ConnectivityManager.setGlobalProxy()" 2021-05-13 09:30:25 +00:00
junyulai
b95083ea6a No-op Refactoring of startTrackDefaultNetwork
While the actual part that track default request is inside
UpstreamNetworkMonitor, instead of passing it from Tethering,
move it into counter-part CL and use it from
UpstreamNetworkMonitor.

Since the current code is replaced by registerSystemDefaultCallback
in Android S, implement it inside the api30 shim implementation
to provide an unified interface to tethering.

Test: atest TetheringCoverageTests
Bug: 185952829
Change-Id: Iaf21b6b662aa6aba79c2b75379128b8523f81f02
2021-05-13 14:07:40 +08:00
Lucas Lin
97d4f16867 Merge "Define PRIVATE_DNS_MODE_OPPORTUNISTIC locally" am: d56f4a700b am: 71d233730c
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1696705

Change-Id: Ifaea1630983078ee810f1d495d0d63fe9acd9d1b
2021-05-12 17:59:30 +00:00
Lucas Lin
71d233730c Merge "Define PRIVATE_DNS_MODE_OPPORTUNISTIC locally" am: d56f4a700b
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1696705

Change-Id: I05089bdc7433ec244fe9be8cbc4e9afd40da0f27
2021-05-12 17:23:46 +00:00
Lucas Lin
d56f4a700b Merge "Define PRIVATE_DNS_MODE_OPPORTUNISTIC locally" 2021-05-12 17:09:50 +00:00
markchien
075432d7c9 Fix some TetheringCoverageTest failure
1. Fix no ACCESS_NETWORK_STATE permission problem when accessing
EthernetManager#getAvailableInterfaces API from S.
2. Fix some wrong jarjar rules.

Bug: 187371740
Test: atest TetheringCoverageTest on R platform
Change-Id: I203db6c4ea2e13d8fb5bc2db7ee877ccbb97b761
2021-05-12 14:12:10 +00:00
markchien
7193a1b30e Test mts against last stable api level
Create *LatestSdk variant build target which have target sdk specify
to allow test apk install to released platform.

Bug: 182211575
Test: test S MtsTetheringTest in R device
Change-Id: I4d5c5e8c3d74993a67380e0211da31884cbf8792
2021-05-12 22:11:04 +08:00
Hungming Chen
3feb782282 bpf: Add interface index to BPF devmap
Add upstream and downstream interface index to BPF map and rename the
BPF map name from xdp_devmap to dev.

$ adb shell dumpsys tethering
    Device map:
      ifindex (iface) -> ifindex (iface)
        21 (21) -> 21 (21)
        25 (25) -> 25 (25)
        12 (rmnet_data2) -> 12 (rmnet_data2)

$ adb shell ip addr
12: rmnet_data2 ..
21: wlan1 ..
25: rndis0 ..

$ adb shell ls /sys/fs/bpf/tethering
map_offload_tether_dev_map

Test: atest TetheringCoverageTests

Change-Id: Ic49965f3374d9e196ee672ec2f0e9e08f3847deb
2021-05-12 19:57:18 +08:00
Lorenzo Colitti
38bf66f05d Remove dead code. am: 2422319cb7 am: 9d288a6904
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1703126

Change-Id: I3913a868982465f304ea5f48da538096dd900641
2021-05-12 10:55:46 +00:00
Lorenzo Colitti
b541f5fdfd Remove mPublicSync. am: 94311aa902 am: c0f1bed8c5
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1678387

Change-Id: I8bc28ee7ed0a658e7218a00c82cb038a58c15d00
2021-05-12 10:55:44 +00:00
Lorenzo Colitti
2bea99a840 Make Tethering#dump asynchronous. am: 5f729e14a3 am: c7a163bae8
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1678386

Change-Id: I000322644add81eb1bc366cf71e7cd308bcda555
2021-05-12 10:55:43 +00:00
Lorenzo Colitti
7c9c64a663 Skip presubmit for IPsec transport mode IPv6 TCP tests. am: b54bdabe5a am: 946da7b575
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1705126

Change-Id: I8d18d775806afdffbf08c2419c2f120ae806ad4d
2021-05-12 10:55:41 +00:00
Lorenzo Colitti
9d288a6904 Remove dead code. am: 2422319cb7
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1703126

Change-Id: I7c3990ac8943e30fae0508a1bda55db02e019a90
2021-05-12 10:41:17 +00:00
Lorenzo Colitti
c0f1bed8c5 Remove mPublicSync. am: 94311aa902
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1678387

Change-Id: I72b34f951a036a7baa1f1f84a55820aa10970198
2021-05-12 10:41:16 +00:00
Lorenzo Colitti
c7a163bae8 Make Tethering#dump asynchronous. am: 5f729e14a3
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1678386

Change-Id: Ifc7372870a3bf12251a909d84e1c9174531a87ec
2021-05-12 10:41:15 +00:00
Lorenzo Colitti
946da7b575 Skip presubmit for IPsec transport mode IPv6 TCP tests. am: b54bdabe5a
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1705126

Change-Id: Iefb634b98f1f7e4420f40b80740eaaef4329e66e
2021-05-12 10:41:11 +00:00
Lorenzo Colitti
2422319cb7 Remove dead code.
Remove a few legacy methods that have no callers.

Test: m
Change-Id: I499e940dc98453194fc528d65a89696471ad8bdd
2021-05-12 17:35:49 +09:00
Lorenzo Colitti
94311aa902 Remove mPublicSync.
This is no longer necessary as all the methods that take it are
running on on the handler thread, either in Tethering itself or
on the state machine thread in IpServer, which runs on the same
thread as Tethering.

Specifically:
- interfaceStatusChanged, interfaceAdded, interfaceRemoved,
  interfaceLinkStateChanged: run from mNetdCallback, which always
  posts them to mHandler.
- setWifiTethering: only called by enableTetheringInternal, which
  is called by the following:
  - startTethering, stopTethering: via lambda posted to mHandler
  - IpServerCallback#requestEnableTethering: called by IpServer
    while processing a command.
- setEthernetTethering: only called by enableTetheringInternal.
- EthernetCallback: runs on mExecutor, which posts to mHandler.
- getLastTetherError: only used by the test. Renamed to
  getLastErrorForTest to ensure no other callers.
- sendTetherStateChangedBroadcast: called only by
  notifyInterfaceStateChange, which is called only by
  - IpServerCallback#updateInterfaceState, which is called only
    by sendInterfaceState, which is called by various IpServer
    state enter methods.
- notifyLinkPropertiesChanged: called only by
  IpServerCallback#updateLinkProperties, which is only called by
  IpServer#sendLinkProperties, which is only called by:
  - Code that processes CMD_IPV6_TETHER_UPDATE
  - IpServer#handleNewPrefixRequest: only called when processing
    CMD_NEW_PREFIX_REQUEST.
  - IpServer#sendInterfaceState (see above)
- handleWifiApAction, handleWifiP2pAction: only called by
  mStateReceiver, which runs on the handler thread
- tether(String, int): called by:
  - tether(String, IIntResultListener): posted to mHandler
  - changeInterfaceState: called by:
    - EthernetCallback (see above)
    - enableWifiIpServingLocked: called by handleWifiApAction and
      handleWifiP2pAction (see above)
    - tetherMatchingInterfaces: only called by handleUsbAction,
      which is run from mStateReceiver on the handler thread.
- untether(String): called by:
  - untether(String, IIntResultListener): posted to mHandler
  - changeInterfaceState (see above)
- setUsbTethering: called by:
  - setUsbTethering(boolean, IIntResultListener): posted to mHandler
  - enableTetheringInternal (see above)
- setNcmTethering: called by enableTetheringInternal (see above)
- getTetheredIfaces: called only by TetheringTest. Renamed to
  getTetheredIfacesForTest to ensure no other callers.
- getErroredIfaces: unused, deleted in this CL
- getTetheredIfaces: called by:
  - isTetheringActive: called by onUserRestrictionsChanged, which
    is only called by mStateReceiver
  - TetheringTest
- dump(): changed to run on handler thread
- upstreamWanted: called by
  - TetherModeAliveState#enter
  - TetherModeAliveState#updateUpstreamWanted, which is called
    only by TetherModeAliveState#processMessage.

Test: atest TetheringCoverageTests
Test: enabled/disabled hotspot, USB tethering
Change-Id: Id49d33f027b8df4c97fda480ff239c0ba90bb96a
2021-05-12 17:35:49 +09:00