Commit Graph

2433 Commits

Author SHA1 Message Date
Remi NGUYEN VAN
b9bd905c0b Merge "Allow TRANSPORT_TEST ethernet networks" am: 6642ec61c3 am: 54c3c2b3c7
Change-Id: I030f0aeb0f196fee213fee02a25c5a7e66618b93
2020-05-29 22:09:13 +00:00
TreeHugger Robot
debec6087b Merge "Add dnsproxyd_protocol_headers for NETID_USE_LOCAL_NAMESERVERS" into rvc-dev am: 51de3f8a10
Change-Id: Ib788169bef168bde7bd49de3dfee6b4e3fcb2561
2020-05-29 14:09:22 +00:00
Remi NGUYEN VAN
656c566cf1 Allow TRANSPORT_TEST ethernet networks
Ethernet networks using tap interfaces should have TRANSPORT_TEST so
they are not considered by network selection.

Test: atest CaptivePortalApiTest FrameworksNetTests
Bug: 156319532
Change-Id: I0d9477977c88aa055625ab4046577a41e76b05ff
2020-05-29 10:22:50 +09:00
Luke Huang
7bdbb811ff Add dnsproxyd_protocol_headers for NETID_USE_LOCAL_NAMESERVERS
NETID_USE_LOCAL_NAMESERVERS is no longer in libnetd_client

Bug: 151895202
Test: build
Change-Id: Iea0c2488dcabdd24d6ffca8134cd11ed12e8308a
2020-05-28 16:42:12 +08:00
Cody Kesting
80aec1d4ff Forward unknown Data Stall types to Connectivity Diagnostics.
This CL forwards suspected Data Stall events detected with unknown
detection methods to ConnectivityDiagnostics.

Currently, ConnectivityService drops any data stall events with unknown
detection methods, which leads to false negatives for Connectivity
Diagnostics registrants. This change ensures that registrants will still
be notified as NetworkStack is updated to use new detection methods.

The documentation for ConnectivityDiagnosticsManager#DataStallReport is
also updated to reflect that the detection methods included in the
report are a bit mask of detection methods used. Implicitly, this means
that data stalls detected via unknown methods will have an empty bit
mask (0x00).

Bug: 156294356
Test: atest ConnectivityDiagnosticsManager
Change-Id: I62d0bf91fcc17c7921afd519c72551399906bd6b
Merged-In: I62d0bf91fcc17c7921afd519c72551399906bd6b
(cherry picked from commit a1d9d811a05bf3447ebb90a39343b53eee79f0db)
2020-05-22 19:12:14 +00:00
Cody Kesting
1dc1ba0bb0 Merge "Forward unknown Data Stall types to Connectivity Diagnostics." am: b10df0da89 am: 8c5375cec3
Change-Id: I31d17c5c353e822f3d48166ffe9cc39abd31c198
2020-05-21 23:35:38 +00:00
Cody Kesting
b37958eec9 Forward unknown Data Stall types to Connectivity Diagnostics.
This CL forwards suspected Data Stall events detected with unknown
detection methods to ConnectivityDiagnostics.

Currently, ConnectivityService drops any data stall events with unknown
detection methods, which leads to false negatives for Connectivity
Diagnostics registrants. This change ensures that registrants will still
be notified as NetworkStack is updated to use new detection methods.

The documentation for ConnectivityDiagnosticsManager#DataStallReport is
also updated to reflect that the detection methods included in the
report are a bit mask of detection methods used. Implicitly, this means
that data stalls detected via unknown methods will have an empty bit
mask (0x00).

Bug: 156294356
Test: atest ConnectivityDiagnosticsManager
Change-Id: I62d0bf91fcc17c7921afd519c72551399906bd6b
2020-05-19 10:57:29 -07:00
Automerger Merge Worker
9ddf8a5953 Create TestApi for simulating a Data Stall on ConnectivityService.
This change adds a TestApi for simulating a Data Stall to
ConnectivityService. This allows for Data Stalls to be triggered without
having to manipulate the signals used by NetworkMonitor . This also
allows NetworkMonitor to update the ways it detects Data Stalls without
affecting CTS tests for ConnectivityDiagnosticsManager.

Bug: 148032944
Test: atest ConnectivityDiagnosticsManagerTest
Change-Id: Icad439efa2ab4c872c21d3ee6ceaae8c5b49f18d
Merged-In: Icad439efa2ab4c872c21d3ee6ceaae8c5b49f18d
(cherry picked from commit b06463a002eb6215e9dda64e599eabd74cb56382)
2020-05-12 20:34:50 +00:00
Cody Kesting
a9b761d261 Set owner and administrator UIDs for test networks.
This change sets the owner and administrator UIDs for test networks when
their initial values match the UID for the app creating the test
network. This ensures that apps registering test networks can only make
themselves owners / administrators of the network.

Bug: 153449964
Test: atest NetworkAgentTest
Change-Id: I3a974700aa1d83cb285295ed1de0aa263e2e5b58
Merged-In: I3a974700aa1d83cb285295ed1de0aa263e2e5b58
(cherry picked from commit 35782280a2adceec96b8e03c217788afa05894a0)
2020-05-12 20:33:42 +00:00
Cody Kesting
f42a04447b Merge "Create TestApi for simulating a Data Stall on ConnectivityService." am: e743a30aa7 am: b36fa34041
Change-Id: I17839cd271d984f76c203889293cc51375bb8bcb
2020-05-12 17:27:09 +00:00
Cody Kesting
801b5b9ea3 Merge "Set owner and administrator UIDs for test networks." am: 2ba1b8ecd1 am: f9877d902e
Change-Id: I7af702ff5eafbd0f5bb2247e0debf975e51accd1
2020-05-12 17:26:44 +00:00
Cody Kesting
e743a30aa7 Merge "Create TestApi for simulating a Data Stall on ConnectivityService." 2020-05-12 16:52:35 +00:00
Cody Kesting
2ba1b8ecd1 Merge "Set owner and administrator UIDs for test networks." 2020-05-12 16:52:07 +00:00
Jack Yu
0298306ba0 Added a new capability for temporarily unmetered network.
Added a new network capability TEMOPORARILY_NOT_METERED to support
the case that a network can temporarily become unmetered. This
allows carriers to deploy unmetered 5G network. When devices
camp on 5G network, this capability will be dynamically added
to the network and will be removed once leaving 5G coverage.

Bug: 153081494
Test: Manual
Change-Id: I10e26cb0852e67f614e7b9c4e49f95e078602e21
Merged-In: I10e26cb0852e67f614e7b9c4e49f95e078602e21
2020-05-06 13:13:45 -07:00
Cody Kesting
f53a075913 Create TestApi for simulating a Data Stall on ConnectivityService.
This change adds a TestApi for simulating a Data Stall to
ConnectivityService. This allows for Data Stalls to be triggered without
having to manipulate the signals used by NetworkMonitor . This also
allows NetworkMonitor to update the ways it detects Data Stalls without
affecting CTS tests for ConnectivityDiagnosticsManager.

Bug: 148032944
Test: atest ConnectivityDiagnosticsManagerTest
Change-Id: Icad439efa2ab4c872c21d3ee6ceaae8c5b49f18d
2020-04-27 20:55:00 -07:00
Cody Kesting
fc7cad313d Set owner and administrator UIDs for test networks.
This change sets the owner and administrator UIDs for test networks when
their initial values match the UID for the app creating the test
network. This ensures that apps registering test networks can only make
themselves owners / administrators of the network.

Bug: 153449964
Test: atest NetworkAgentTest
Change-Id: I3a974700aa1d83cb285295ed1de0aa263e2e5b58
2020-04-27 20:54:57 -07:00
Philip P. Moltmann
84091e184a Merge "Set attributionTag for noteOp(WRITE_SETTINGS) calls" am: da8697a48b am: 7b3866f284
Change-Id: I099944752fc3006c1e98750dd46dbebf5e50789f
2020-04-22 15:19:14 +00:00
Philip P. Moltmann
7bc33dfb89 Set attributionTag for noteOp(WRITE_SETTINGS) calls
Test: atest FrameworksNetTests TetheringTests:TetheringServiceTest
Bug: 136595429
Merged-In: I33f787644c44d7b0e5ce17a433820cfcd985cdfb
Change-Id: Ic3d937e7bb5141798234ed5b2852c1f768e97495
2020-04-20 18:00:03 -07:00
Chalard Jean
008a54b355 Merge "Add instrumentation to test NetworkAgent." into rvc-dev 2020-04-14 04:54:33 +00:00
Chalard Jean
0e9a7738d0 Allow testing of signal strength
- Let any process with NETWORK_SETTINGS register for signal strength
  wakeup.
- Allow agents registering test networks to assign them a signal
  strength.

Test: NetworkAgentTest
Bug: 139268426
Change-Id: Iebfeb9316bcbd8472459c517abb16f1f9d879871
Merged-In: I2b4b89be3e69f4853fd6978d2c8f5c8eb4271f21
(cherry picked from commit 5cc7b18fe7fa94ce2e30572c476df445ed337741, aosp/1284585)
2020-04-14 01:22:14 +00:00
Chalard Jean
e770137062 Add instrumentation to test NetworkAgent.
Test: NetworkAgentTest, new tests using this API
Bug: 139268426
Change-Id: I0b65be788bb742fd1a8c0ca624e97368462f9b6a
Merged-In: Ia83b1c896df63bb18e2aa4b74d6cc09eba990eb5
(cherry picked from commit d89dcb9765b9c73c950661faaf8af9b795934acb, aosp/1284574)
2020-04-14 01:20:16 +00:00
Chalard Jean
9a14a06ae5 Merge "Allow testing of signal strength" am: 836df36aee am: 926dbce337
Change-Id: Ib00611c70d9b8fc3e4ee5338980344f5e2167fa1
2020-04-13 17:50:19 +00:00
Chalard Jean
6edf06afb0 Merge "Add instrumentation to test NetworkAgent." am: eb1d6593c5 am: 6dcb6a943c
Change-Id: Ief4f6bd95ba513e08c5d2e9e8fef9d0c426b4478
2020-04-13 15:22:45 +00:00
Chalard Jean
6b59b8fbcc Allow testing of signal strength
- Let any process with NETWORK_SETTINGS register for signal strength
  wakeup.
- Allow agents registering test networks to assign them a signal
  strength.

Test: NetworkAgentTest
Bug: 139268426
Change-Id: I2b4b89be3e69f4853fd6978d2c8f5c8eb4271f21
2020-04-13 21:55:32 +09:00
Chalard Jean
be9447be58 Add instrumentation to test NetworkAgent.
Test: NetworkAgentTest, new tests using this API
Bug: 139268426
Change-Id: Ia83b1c896df63bb18e2aa4b74d6cc09eba990eb5
2020-04-13 15:44:07 +09:00
Treehugger Robot
b9db69f623 Fix a theoretical NPE
Test: NetworkAgentTests
Bug: 153718627

Change-Id: I955b6dac6de48b12696dc640f131f5983ac552df
Merged-In: I08f57cce0cd85d5cd66e9a0ef948224290e9200e
(cherry picked from commit 31492c708746a51f70c74913a4d6cd97bf06ae63, aosp/1284575)
2020-04-11 03:26:27 +00:00
Treehugger Robot
e75cd4b458 Merge "Fix a theoretical NPE" am: e21dccde6b am: 49021c2c68
Change-Id: Ibf814e81ca984b47b9be1e423e2cde908cf7f193
2020-04-10 17:08:04 +00:00
Chalard Jean
35a06972cc Fix a theoretical NPE
Test: NetworkAgentTests
Bug: 153718627
Change-Id: I08f57cce0cd85d5cd66e9a0ef948224290e9200e
2020-04-10 23:08:00 +09:00
Treehugger Robot
50756739b5 Fix a stupid NPE
Okay so this is really not a behavior change as it converts an
NPE into an illegal argument exception, but still, that's what
should happen (and that's what the upcoming test actually tests
for).

Test: upcoming NetworkAgentTest
Bug: 139268426
Change-Id: I0d9b8cb8f8dcb587b9430b486b863efb9e9e77ef
Merged-In: I3e17211c03bc74426bf5e2e414ec322d73b0060b
(cherry picked from commit 827d7ceea1e83cca9ba3f6189e20b6780c0194ed, aosp/1277595)
2020-04-07 07:29:10 +00:00
Treehugger Robot
57e2a625f5 Merge "Fix a stupid NPE" am: 16f4882784 am: b3f7f04518
Change-Id: I68e5702008a82d93c634fd45c2bd83a33fdf0cd2
2020-04-07 06:18:28 +00:00
Treehugger Robot
16f4882784 Merge "Fix a stupid NPE" 2020-04-07 05:53:10 +00:00
Chalard Jean
26fc3f31ff Fix a bug where the legacy extra info is reset on connect.
Bug: 149459996
Test: NetworkAgentTest FrameworksNetTests FrameworksWifiTests FrameworksTelephonyTests

Change-Id: I3e437f0fe2eb28f1d621551a8daf164a06af83fc
Merged-In: I3e437f0fe2eb28f1d621551a8daf164a06af83fc
(cherry picked from commit a3fdb94a32eda40e322b7dbdaf3fad9b42bfbbb9, originally aosp/1277602)
2020-04-06 11:14:59 +00:00
Chalard Jean
a6e848328a Merge "Fix a bug where the legacy extra info is reset on connect." am: 7e2d55206e am: 9f964ebc15
Change-Id: I127bf621caa39a24265f30cd4c781248410e5348
2020-04-06 06:34:09 +00:00
Chalard Jean
56c327341e Fix a bug where the legacy extra info is reset on connect.
Bug: 149459996
Test: NetworkAgentTest FrameworksNetTests FrameworksWifiTests FrameworksTelephonyTests
Change-Id: I5f8f6d962ee3317e101d19518c767b3c327c0c47
2020-04-06 12:46:19 +09:00
TreeHugger Robot
147d1574b1 Merge "Only apply VPN isolation if it's fully routed" into rvc-dev 2020-04-04 03:44:46 +00:00
Lorenzo Colitti
53e0564ca4 Merge "Added a new capability for temporarily unmetered network." into rvc-dev am: 0edabc5e4e
Change-Id: I4d43b28d25529d4dd9e4304c4edf95edb5c5110b
2020-04-03 05:07:20 +00:00
Jack Yu
71863e9604 Added a new capability for temporarily unmetered network.
Added a new network capability TEMOPORARILY_NOT_METERED to support
the case that a network can temporarily become unmetered. This
allows carriers to deploy unmetered 5G network. When devices
camp on 5G network, this capability will be dynamically added
to the network and will be removed once leaving 5G coverage.

Bug: 153081494
Test: Manual
Change-Id: I10e26cb0852e67f614e7b9c4e49f95e078602e21
2020-04-02 19:28:41 -07:00
Chalard Jean
380318053b Fix a stupid NPE
Okay so this is really not a behavior change as it converts an
NPE into an illegal argument exception, but still, that's what
should happen (and that's what the upcoming test actually tests
for).

Test: upcoming NetworkAgentTest
Bug: 139268426
Change-Id: I3e17211c03bc74426bf5e2e414ec322d73b0060b
2020-04-03 07:17:13 +09:00
Lorenzo Colitti
7fb7c3e0bf Only apply VPN isolation if it's fully routed
VPN is considered fully routed if both IPv4 and IPv6 have
either a default route or a prohibit route.

Bug: 145332510
Test: atest FrameworksNetTests
Merged-In: I59cf48552bca98092d1212e3d718fd420add5458
Change-Id: I59cf48552bca98092d1212e3d718fd420add5458
2020-04-02 10:36:19 +00:00
Chalard Jean
9122e56202 Merge changes from topics "api-fix-networkagent", "satisfiedby"
* changes:
  Rename satisfiedBy into canBeSatisfiedBy
  Address further API council comments.
2020-04-02 05:51:02 +00:00
Lorenzo Colitti
62d2333abd Merge "Only apply VPN isolation if it's fully routed" am: 5c5d1a1282 am: d24e7fb5a1
Change-Id: I9230f1a73698344eb40ae3e0ebc5d73cc259f2d0
2020-04-02 04:50:41 +00:00
Lorenzo Colitti
5c5d1a1282 Merge "Only apply VPN isolation if it's fully routed" 2020-04-02 04:10:12 +00:00
Chalard Jean
c62f9a53d8 Rename satisfiedBy into canBeSatisfiedBy
Test: FrameworksNetTests NetworkStackTests
Bug: 152238712
Change-Id: I076876a6662bde143ef7d315ce3767acafff93c1
Merged-In: I076876a6662bde143ef7d315ce3767acafff93c1
2020-04-01 20:38:30 +08:00
Rubin Xu
ab8cf306ea Only apply VPN isolation if it's fully routed
VPN is considered fully routed if both IPv4 and IPv6 have
either a default route or a prohibit route.

Bug: 145332510
Test: atest FrameworksNetTests
Change-Id: I59cf48552bca98092d1212e3d718fd420add5458
2020-04-01 09:36:29 +01:00
Chalard Jean
691a34d96b Address further API council comments.
Test: FrameworksNetTests NetworkStackTests
Bug: 152238712
Copy from ag/10866511
Change-Id: I8a785ae0e74e659c317deaaa28c203356c7766ed
Merged-In: I8a785ae0e74e659c317deaaa28c203356c7766ed
2020-04-01 16:01:04 +08:00
Aaron Huang
f210e24871 Merge changes from topics "networkagent_api", "networkprovider_api"
* changes:
  Update the NetworkProvider API for council comments
  Update NetworkAgentConfig API for council comments
  Update the NetworkAgent API for council comments
2020-04-01 05:33:28 +00:00
Cody Kesting
84cfd6c6e4 Merge "Clarify comments for Connectivity Diagnostics reports." am: 87ce14f328 am: 1d99c7333f
Change-Id: I4e6452b4875a8c3e3739dea4d3bc281a006156eb
2020-03-31 18:17:26 +00:00
Cody Kesting
ad6fd5bfc8 Merge "Sort administrator UIDs for NetworkCapabilities." am: c350963548 am: 8d84479831
Change-Id: I453f81bcb7c426ab4b529acce5c32c502a29331b
2020-03-31 18:17:14 +00:00
Cody Kesting
975c5c699a Merge "Add combine() and equals() for NetworkCapabilities admin UIDs." am: e4df39ba4b am: e0463c56eb
Change-Id: Ic8fc22f0eb47836053fc6b9423018c16ae46ef46
2020-03-31 18:16:18 +00:00
Cody Kesting
87ce14f328 Merge "Clarify comments for Connectivity Diagnostics reports." 2020-03-31 17:43:44 +00:00