Commit Graph

29198 Commits

Author SHA1 Message Date
Paul Hu
6f9ba0496e Merge "Listen EXTERNAL_APPLICATIONS_AVAILABLE intent" into sc-dev am: 790d3eb079
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/14772860

Change-Id: I9b09ac787d1ec4580c724426a66abf8c1446217c
2021-07-02 14:32:26 +00:00
Paul Hu
790d3eb079 Merge "Listen EXTERNAL_APPLICATIONS_AVAILABLE intent" into sc-dev 2021-07-02 14:17:17 +00:00
Paul Hu
3dc7387fdb Merge "Use Netd new added/removed uid range methods" into sc-dev am: 29194db12f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/14911836

Change-Id: I5639000ecd2669b677c98e359cb042ac17a69efc
2021-07-02 12:21:16 +00:00
Paul Hu
29194db12f Merge "Use Netd new added/removed uid range methods" into sc-dev 2021-07-02 12:08:35 +00:00
Paul Hu
75ca971c66 Merge "Force only system uid can set uids allowed on restricted networks" into sc-dev am: 77739d37b3
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15172131

Change-Id: I0e35396ef80f046aa31931940714dee65a7b781c
2021-07-02 11:02:59 +00:00
Paul Hu
77739d37b3 Merge "Force only system uid can set uids allowed on restricted networks" into sc-dev 2021-07-02 10:46:19 +00:00
TreeHugger Robot
6018e38cad Merge "Change to REQUEST from LISTEN for mobile data preferred uids feature" into sc-dev am: f5f8e4e3a5
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15179351

Change-Id: I65363d10cf9ff08cbc9bde2423bcdeca107b94e7
2021-07-02 09:48:22 +00:00
TreeHugger Robot
f5f8e4e3a5 Merge "Change to REQUEST from LISTEN for mobile data preferred uids feature" into sc-dev 2021-07-02 09:27:38 +00:00
TreeHugger Robot
973f785b73 Merge "Remove workarounds to use core platform API" into sc-dev am: 169f43d117
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15175216

Change-Id: I4e3a3ed12857c9bb59097c79c0b95f68c06d0540
2021-07-02 08:55:32 +00:00
TreeHugger Robot
169f43d117 Merge "Remove workarounds to use core platform API" into sc-dev 2021-07-02 08:53:34 +00:00
TreeHugger Robot
991b0ee82a Merge "Test Entitlement when telephony is present" into sc-dev am: 8d75184baf
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/14947613

Change-Id: I784138f5eef0b99a338fe28724f9002b5ae13bbb
2021-07-02 08:51:35 +00:00
TreeHugger Robot
8d75184baf Merge "Test Entitlement when telephony is present" into sc-dev 2021-07-02 08:29:15 +00:00
Remi NGUYEN VAN
48a0dbefbd Fix CtsNetTestCases in instant mode am: 21e5140ff4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15179352

Change-Id: Iea06a9e9a3cbacecf9a5ada088ef3a25fc779e45
2021-07-02 07:32:20 +00:00
Remi NGUYEN VAN
21e5140ff4 Fix CtsNetTestCases in instant mode
Skip tests that cannot run in instant mode, as WifiManager is not
available, and the test cannot bind to sockets in instant mode.

Bug: 192284219
Test: atest CtsNetTestCases -- --enable-parameterized-modules \
        --abi arm64-v8a --module-parameter instant_app
Original-Change: https://android-review.googlesource.com/1753823
Merged-In: I7a7b0169a3a495bb359dc1f72e56937dcdc5b8a8
Change-Id: I7a7b0169a3a495bb359dc1f72e56937dcdc5b8a8
2021-07-02 06:04:35 +00:00
Treehugger Robot
0cc6f3b99d Test Entitlement when telephony is present
bug: 187331752
Test: atest android.tethering.test.TetheringManagerTest
Original-Change: https://android-review.googlesource.com/1735336
Merged-In: I9fbb7141691fbbf8685b46359c050e0385928805
Change-Id: I9fbb7141691fbbf8685b46359c050e0385928805
2021-07-02 05:48:23 +00:00
Lucas Lin
be95328ab1 Merge "Print the result of command when test is failed" into sc-dev am: 0def47421d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15165009

Change-Id: I953b20df723ee06cbc415a5bfe90ea34298b09bd
2021-07-02 05:44:33 +00:00
Lucas Lin
0def47421d Merge "Print the result of command when test is failed" into sc-dev 2021-07-02 05:27:45 +00:00
Orion Hodson
ce47122578 Remove dependency on stable.core.platform.api.stubs am: 5e5c287d6b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15163615

Change-Id: Iae64d04b662b76582b7579d541d90f6acf6f90ad
2021-07-02 04:57:59 +00:00
Remi NGUYEN VAN
298f6aff93 Remove workarounds to use core platform API
Core platform API stubs are now correctly included in module_current and
system_server_current, so workarounds used to use such APIs can be
removed.

OsCompat and InetAddressCompat were only necessary because manually
adding the stubs did not resolve the problem for classes that had
public API stubs, which shadowed the module API stubs.

The manual stubs dependency was already removed in another change. Also
remove the service jar dependency on android_system_server_stubs_current
as it is already included in sdk_version system_server_current.

Bug: 183097033
Test: atest CtsNetTestCases

Original-Change: https://android-review.googlesource.com/1754889
Merged-In: Id448be03b679f832edb24f1b77f471227faf5268
Change-Id: Id448be03b679f832edb24f1b77f471227faf5268
2021-07-02 04:54:29 +00:00
Paul Hu
07950df234 Change to REQUEST from LISTEN for mobile data preferred uids feature
- If Mobile data always on is OFF, mobile data preferred uids
  feature does not work.
- We need to request mobile data when MDO list is not empty.

Bug: 171872461
Test: atest FrameworksNetTests
Test: atest CtsNetTestCases

Signed-off-by: Ansik <ansik.shin@samsung.com>
Original-Change: https://android-review.googlesource.com/1751023
Merged-In: Ie9d6b3e39ef16813c4be3979900d226c8f3d656d
Change-Id: Ie9d6b3e39ef16813c4be3979900d226c8f3d656d
2021-07-02 03:03:07 +00:00
Orion Hodson
5e5c287d6b Remove dependency on stable.core.platform.api.stubs
Bug: 183097033
Test: m droid
Original-Change: https://android-review.googlesource.com/1751523
Merged-In: I06cbc7e06e112d61575fad6ad0783348c94e3df2
Change-Id: I06cbc7e06e112d61575fad6ad0783348c94e3df2
2021-07-02 00:42:52 +00:00
Sudheer Shanka
311b28c020 Merge "Skip NetworkPolicyManagerTest on unsupported devices." into sc-dev am: 0a224da8d3
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15167635

Change-Id: Ibcdf57e5dad03cea9e07cc18c1c3c5b6acdcb5f0
2021-07-01 23:40:25 +00:00
Sudheer Shanka
0a224da8d3 Merge "Skip NetworkPolicyManagerTest on unsupported devices." into sc-dev 2021-07-01 23:28:45 +00:00
Sudheer Shanka
fe89aaad47 Skip NetworkPolicyManagerTest on unsupported devices.
Fixes: 192473577
Test: atest CtsHostsideNetworkTests:HostsideNetworkPolicyManagerTests
Change-Id: Ib90f0045cb574ada792c5d43fcc359c22d20f3a4
Merged-In: Ib90f0045cb574ada792c5d43fcc359c22d20f3a4
2021-07-01 17:10:02 +00:00
TreeHugger Robot
5e427a411e Merge "Make notification icons and autocancel overlayable" into sc-dev am: 2a512b4a16
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15172450

Change-Id: I07a3e28797aaff19d7edd1ac7c965399dd49eaaa
2021-07-01 15:37:38 +00:00
TreeHugger Robot
2a512b4a16 Merge "Make notification icons and autocancel overlayable" into sc-dev 2021-07-01 15:24:43 +00:00
paulhu
03635b3ad5 Force only system uid can set uids allowed on restricted networks
- Check whether calling UID/PID is system_server.
- For CTS test, enforce NETWORK_SETTINGS permission otherwise if
  it's a debug build.

Bug: 175199465
Test: atest FrameworksNetTests
Test: atest ConnectivityManagerTest#testUidsAllowedOnRestrictedNetworks
Ignore-AOSP-First: Need cherry-pick
Change-Id: I175a831671d3e52460d28203b09f6c0dda56b61c
2021-07-01 23:01:41 +08:00
TreeHugger Robot
1dbd4239a7 Merge "Dump the protocol of IPv4 offload rule" into sc-dev am: a575bce0ed
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15164997

Change-Id: I5e167aaf42b5d4cbf23eef34dd2e1ed7c66fc326
2021-07-01 11:03:45 +00:00
TreeHugger Robot
1f798f9800 Merge "Fix testGetAllNetworkStateSnapshots for non-cellular" into sc-dev am: 86a118c060
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15108489

Change-Id: I19519b91d29533ff459c14bca0038d6832db1da6
2021-07-01 11:03:31 +00:00
TreeHugger Robot
a575bce0ed Merge "Dump the protocol of IPv4 offload rule" into sc-dev 2021-07-01 10:54:44 +00:00
TreeHugger Robot
86a118c060 Merge "Fix testGetAllNetworkStateSnapshots for non-cellular" into sc-dev 2021-07-01 10:53:27 +00:00
Treehugger Robot
8ef6bfe5ae Make notification icons and autocancel overlayable
Allow overlays to change the connectivity notification icons, and
whether the notifications are auto-cancelled.

This does not change default behavior, but is necessary to allow vendors
to adapt the notifications to their standards.

Bug: 173171709
Bug: 172048052
Test: atest NetworkNotificationManagerTest
      Added test overlay, verified icon replaced
Original-Change: https://android-review.googlesource.com/1753822
Merged-In: Ibbb765a5e828b8b870cbfb81e89df2dbd2828be7
Change-Id: Ibbb765a5e828b8b870cbfb81e89df2dbd2828be7
2021-07-01 10:44:09 +00:00
Luke Huang
de8cdb81c6 Merge "Fix the comments from aosp/1719018" into sc-dev am: bf9cb4dd18
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15076676

Change-Id: I1645777332b870001c496b464693eb96c223e78b
2021-07-01 10:28:35 +00:00
Lucas Lin
a10f2a5f25 Print the result of command when test is failed
When ConnectivityManagerTest#testGetMultipathPreference() is
failed, it only prints "Unexpected format from cmd netpolicy" and
it's not helpful.
Print the result of command can help people to know what's the
difference between expected result and actual result.

Bug: 187921745
Test: atest CtsNetTestCases:ConnectivityManagerTest#testGetMultipathPreference
Original-Change: https://android-review.googlesource.com/1749262
Merged-In: I63cd4b043e7c70775156aa5244d25ee2268f9f32
Change-Id: I63cd4b043e7c70775156aa5244d25ee2268f9f32
2021-07-01 10:11:13 +00:00
Luke Huang
bf9cb4dd18 Merge "Fix the comments from aosp/1719018" into sc-dev 2021-07-01 09:49:46 +00:00
Lucas Lin
5f071c5925 Merge "Simplify the return condition in stop()" into sc-dev am: b851d80de2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15164994

Change-Id: Ic23afbcaadffaf87ca760473dc5a10cd6e7c02eb
2021-07-01 09:37:44 +00:00
Junyu Lai
4bdfd01aee Merge "Fix network callback with the same PendingIntent does not release" into sc-dev am: 8ba13e99e8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15164991

Change-Id: Ic875052f9a045c32a19457fa5d154b1502a6a1ab
2021-07-01 09:37:23 +00:00
Lucas Lin
b851d80de2 Merge "Simplify the return condition in stop()" into sc-dev 2021-07-01 09:09:39 +00:00
Junyu Lai
8ba13e99e8 Merge "Fix network callback with the same PendingIntent does not release" into sc-dev 2021-07-01 09:08:40 +00:00
Treehugger Robot
21ec633e39 Fix testGetAllNetworkStateSnapshots for non-cellular
bug: 192115694
Test: atest ConnectivityManagerTest#testGetAllNetworkStateSnapshots
Original-Change: https://android-review.googlesource.com/1749483
Merged-In: Ie7f637248302f3e6b61be69ef4c6a7a906e69275
Change-Id: Ie7f637248302f3e6b61be69ef4c6a7a906e69275
2021-07-01 08:47:03 +00:00
Nucca Chen
a4a7825e13 Dump the protocol of IPv4 offload rule
Print the protocol {tcp, udp} of v4 rules in dumpsys.

Format:
proto [inDstMac] iif(iface) src -> nat -> dst [outDstMac] age
  udp [00:00:00:00:00:00] 14(rmnet0) 74.125.10.156:443
  -> 30(30) 10.254.92.123:60262 -> 192.168.128.240:60262
  [0a:bd:b5:e0:41:53] 96067ms

Bug: 190783768
Test: dumpsys tethering
Original-Change: https://android-review.googlesource.com/1753608
Merged-In: Idae1042cfb454cc97b9b103587f11bc0700e0787
Change-Id: Idae1042cfb454cc97b9b103587f11bc0700e0787
2021-07-01 08:31:23 +00:00
TreeHugger Robot
0488f2897d Merge "Fix and test usb function configuration change" into sc-dev am: 424ef2043c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15142213

Change-Id: I4715b27d4ce6f44411703ede576b20811328f113
2021-07-01 07:15:55 +00:00
TreeHugger Robot
3ede39228b Merge "Remove wigig support from S tethering" into sc-dev am: 2e0cdad198
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15142212

Change-Id: Ia708b28d4b2795e0d4c7615d6b2692f61f850be4
2021-07-01 07:15:40 +00:00
TreeHugger Robot
424ef2043c Merge "Fix and test usb function configuration change" into sc-dev 2021-07-01 07:04:48 +00:00
TreeHugger Robot
2e0cdad198 Merge "Remove wigig support from S tethering" into sc-dev 2021-07-01 07:02:38 +00:00
Lucas Lin
5ca769ef4a Simplify the return condition in stop()
Previously, the return condition in stop() will check if the state
is STOPPING and the reason is ERROR_INVALID_NETWORK. The condition
is too restricted so that if another event is happened after binder
died, the exception will be thrown and crash the system.
Since calling stop() twice doesn't make sense, so relax the condition
of return when the state is STOPPING.

Bug: 182586681
Test: atest FrameworksNetTests
Original-Change: https://android-review.googlesource.com/1729690
Merged-In: I2454c1c080d8954dd3785d4ac6e96fc4131fdb47
Change-Id: I2454c1c080d8954dd3785d4ac6e96fc4131fdb47
2021-07-01 06:57:53 +00:00
Hungming Chen
891ba6680a Dump the unused IPv4 BPF rule age correctly am: 59f422694a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15164992

Change-Id: Iec2505b0d0648718f6d05445f87be87592f25c49
2021-07-01 04:47:37 +00:00
Chiachang Wang
a7e58ab6bc Trigger the network score update after setting test allow bad wifi am: 6339ec22ad
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15164990

Change-Id: I6f47ea4d87d1a065599deb1b4775ba817267ccf4
2021-07-01 03:27:26 +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
paulhu
de2a23958d Use Netd new added/removed uid range methods
Replace network[Add|Remove]UidRanges to
network[Add|Remove]UidRangesParcel. The new methods are passing
NativeUidRangeConfig which contains priority value for each uid
range rules.

Bug: 171872461
Test: atest FrameworksNetTests
Test: atest HostsideVpnTests
Ignore-AOSP-First: Need cherry-pick
Change-Id: I08bbdbcb8450b08e6208fa730137348550f9e3d2
2021-07-01 03:10:45 +00:00