Commit Graph

10128 Commits

Author SHA1 Message Date
Automerger Merge Worker
ccbe594a03 Merge "[automerger skipped] Merge changes I37dd459d,I1959f308 into rvc-dev am: 0cd6d1cb70 -s ours am: 6e6dad4cd1 -s ours" into rvc-d1-dev-plus-aosp am: 61ae308aba -s ours
am skip reason: Change-Id I37dd459d08b57b14f72f3b28ea80fa231b152f10 with SHA-1 bfd3c75dce is in history

Change-Id: Ie3884e88a5e1b7e8997da346c7984a6bf02b186f
2020-05-12 21:04:43 +00:00
Automerger Merge Worker
c1cd35ab13 [automerger skipped] Merge changes from topic "am-a4c996e50cb34a3bb257f059536b77ae" into rvc-d1-dev-plus-aosp am: 5f93a08607 -s ours
am skip reason: Change-Id I37dd459d08b57b14f72f3b28ea80fa231b152f10 with SHA-1 b645699cdb is in history

Change-Id: I0ea68069cd9e07bf2d95b14452046fdb63613782
2020-05-12 21:03:36 +00:00
Automerger Merge Worker
61ae308aba Merge "[automerger skipped] Merge changes I37dd459d,I1959f308 into rvc-dev am: 0cd6d1cb70 -s ours am: 6e6dad4cd1 -s ours" into rvc-d1-dev-plus-aosp 2020-05-12 20:47:07 +00:00
TreeHugger Robot
287064ab75 [automerger skipped] Merge changes I37dd459d,I1959f308 into rvc-dev am: 0cd6d1cb70 -s ours am: 6e6dad4cd1 -s ours
am skip reason: Change-Id I37dd459d08b57b14f72f3b28ea80fa231b152f10 with SHA-1 b645699cdb is in history

Change-Id: I439913a4195cea16832b3ec6c19a3cfaa63dfdb8
2020-05-12 20:47:02 +00:00
TreeHugger Robot
4d2bf48c26 [automerger skipped] Merge changes I37dd459d,I1959f308 into rvc-dev am: 0cd6d1cb70 am: 497e8f14fa -s ours
am skip reason: Change-Id I37dd459d08b57b14f72f3b28ea80fa231b152f10 with SHA-1 b645699cdb is in history

Change-Id: Ib9aaf9091937ae27f35a389cc3de696567cefe1b
2020-05-12 20:46:55 +00:00
Benedict Wong
65b5cc0ec8 [automerger skipped] Use TransformRecord to get SPI instead of SpiRecord am: 2d70990d2c am: 4775132aa1 -s ours
am skip reason: Change-Id I1959f3080946267243564459ff4207647922566e with SHA-1 6ee2b93ed3 is in history

Change-Id: Id31a417c7a4204bd646400e90456424d12d2d9d0
2020-05-12 20:46:52 +00:00
TreeHugger Robot
497e8f14fa Merge changes I37dd459d,I1959f308 into rvc-dev am: 0cd6d1cb70
Change-Id: Ie0c5a3c7bfc16edf98203212b8a1e7e4e8b302b9
2020-05-12 20:45:01 +00:00
Benedict Wong
4775132aa1 Use TransformRecord to get SPI instead of SpiRecord am: 2d70990d2c
Change-Id: I011543293623240b5652ac9818b0b3f28a397e97
2020-05-12 20:44:59 +00:00
TreeHugger Robot
6e6dad4cd1 [automerger skipped] Merge changes I37dd459d,I1959f308 into rvc-dev am: 0cd6d1cb70 -s ours
am skip reason: Change-Id I37dd459d08b57b14f72f3b28ea80fa231b152f10 with SHA-1 b645699cdb is in history

Change-Id: I0b5556bcaa27ca0a379f910bfba80aec506348c9
2020-05-12 20:41:03 +00:00
Automerger Merge Worker
2c729d4cc5 Merge "Merge "Create TestApi for simulating a Data Stall on ConnectivityService." am: e743a30aa7 am: b36fa34041" into rvc-dev-plus-aosp am: abd8340a70 am: 785928f6b3
Change-Id: I17ddf91a95c9f1e73fbbd0fac62851d139732be1
2020-05-12 18:25:39 +00:00
Cody Kesting
15f2ce17f1 Merge "Set owner and administrator UIDs for test networks." am: 2ba1b8ecd1 am: f9877d902e am: 801b5b9ea3 am: e147054311
Change-Id: I4e3b94372ad788ecefe270d6ca18b611b3463bf5
2020-05-12 18:24:54 +00:00
Automerger Merge Worker
785928f6b3 Merge "Merge "Create TestApi for simulating a Data Stall on ConnectivityService." am: e743a30aa7 am: b36fa34041" into rvc-dev-plus-aosp am: abd8340a70
Change-Id: I1860d59ed83e14337564d8db248fc5b0e6581120
2020-05-12 17:51:24 +00:00
Cody Kesting
e147054311 Merge "Set owner and administrator UIDs for test networks." am: 2ba1b8ecd1 am: f9877d902e am: 801b5b9ea3
Change-Id: I0d467e1fd02995cf2fe4c3f41e0ea78d4f2be9e2
2020-05-12 17:50:24 +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
b36fa34041 Merge "Create TestApi for simulating a Data Stall on ConnectivityService." am: e743a30aa7
Change-Id: Ie14ab9cbcf8f7b291fb88f4b4abedab1b5978c3e
2020-05-12 17:10:10 +00:00
Cody Kesting
f9877d902e Merge "Set owner and administrator UIDs for test networks." am: 2ba1b8ecd1
Change-Id: I3b1c29b30912c4dddc3524a9a28fb3ad8c3ac318
2020-05-12 17:09:14 +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
Remi NGUYEN VAN
118bc81ad6 Merge "Send full LinkProperties to NetworkMonitor" am: bdbe7b72fe am: 167f06836c am: 6744f95206 am: c324be35c0
Change-Id: I76892cd7739d2a72487f294c634967835848059d
2020-05-12 09:20:45 +00:00
Remi NGUYEN VAN
c324be35c0 Merge "Send full LinkProperties to NetworkMonitor" am: bdbe7b72fe am: 167f06836c am: 6744f95206
Change-Id: Ib9e859e427e737afe04d06482db5a50803822b6f
2020-05-12 09:05:40 +00:00
Remi NGUYEN VAN
6744f95206 Merge "Send full LinkProperties to NetworkMonitor" am: bdbe7b72fe am: 167f06836c
Change-Id: I7e81f65e4b8f22a646dba191748133841a569d44
2020-05-12 08:53:53 +00:00
Remi NGUYEN VAN
167f06836c Merge "Send full LinkProperties to NetworkMonitor" am: bdbe7b72fe
Change-Id: Ib33f33a1998b61b980315e7278162e57f8f56cf2
2020-05-12 08:37:41 +00:00
Remi NGUYEN VAN
bdbe7b72fe Merge "Send full LinkProperties to NetworkMonitor" 2020-05-12 08:13:05 +00:00
Chalard Jean
121fdd0099 Merge "Fix a bug where VPNs start out suspended on cellular" am: bd3a7f994d am: e428a22b07 am: 9b010a98db am: 958e43a2af
Change-Id: Ib63e5ce0f1e986c7d4bd4895e36a34ef94f62a57
2020-05-11 05:25:52 +00:00
Chalard Jean
958e43a2af Merge "Fix a bug where VPNs start out suspended on cellular" am: bd3a7f994d am: e428a22b07 am: 9b010a98db
Change-Id: I7b21a5ba0e1d3bd15c8c1c0a33091955d67c5d86
2020-05-11 05:15:00 +00:00
Chalard Jean
9b010a98db Merge "Fix a bug where VPNs start out suspended on cellular" am: bd3a7f994d am: e428a22b07
Change-Id: I368308ded731b221be7fae6ddf1723c587ae4d20
2020-05-11 04:59:35 +00:00
Chalard Jean
e428a22b07 Merge "Fix a bug where VPNs start out suspended on cellular" am: bd3a7f994d
Change-Id: Ic28ed72f30d49da7bd137b4d4db125b895025ed0
2020-05-11 04:46:46 +00:00
Chalard Jean
fbd6a2c012 Fix a bug where VPNs start out suspended on cellular
As NetworkAgent is in a transition where all agents need
to include the NOT_SUSPENDED capability as part of their
migration to the system API, ConnectivityService adds it
forcefully to all agents that don't have the CELLULAR
transport. This doesn't include VPNs when VPNs have some
cellular network as their underlying network.

The best way to solve this is to make sure the VPN
capabilities reflect those of the underlying networks as
far as the NOT_SUSPENDED capability is concerned. This
is how they work for other similar capabilities.

This also happens to contain a drive-by fix for an issue
with a spurious capabilities callback is triggered when
a VPN connects and it has any underlying network (which
means almost always, because it will take the default
network if it doesn't declare any). Fixing this was
necessary to have a cogent test of this issue, but it
could be moved to another patch or it could stay unfixed
with some minor ajustment to the tests if judged too
dangerous to include in R at this point.

Test: New tests in this patch. Also manually tested with
      tcpdump as described in b/150570873.
Bug: 150570873
Change-Id: I3e4ff990c0d4825b21c7679be29a482a2d1324ec
2020-05-11 10:44:50 +09:00
Remi NGUYEN VAN
c9f24746f2 Send full LinkProperties to NetworkMonitor
Set the parcelSensitiveFields bit when sending LinkProperties to
NetworkMonitor, so that the captive portal API URL is not lost.

Test: atest ConnectivityServiceIntegrationTest (see followup change)
Bug: 156062304
Change-Id: Ifd4e9c02a6b9a2b2b8b254fc4da7bfb9e0a84550
2020-05-10 16:11:11 +09:00
Benedict Wong
bfd3c75dce Add tests for Tunnel, Transport mode application with released SPIs
This change adds tests to validate that both transport and tunnel mode
transforms continue to work even after the SPI resource has been
released. Specifically, since SPI resources are effectively subsumed by
the creation of a Transform, the SPI resource is still "alive", but
removed from the user-tracking sparse arrays.

Bug: 142072071
Test: Added these new tests. Failing prior to aosp/1133555, passes with.
Change-Id: I37dd459d08b57b14f72f3b28ea80fa231b152f10
Merged-In: I37dd459d08b57b14f72f3b28ea80fa231b152f10
(cherry picked from commit 4d3f871a944d24cd7cbe3aa51a789a71020eafb5)
2020-05-08 00:01:59 -07:00
Benedict Wong
2d70990d2c Use TransformRecord to get SPI instead of SpiRecord
IpSecService.applyTunnelModeTransform() currently does not take an
SpiRecord instance, yet implicitly requires that the SpiRecord instance
is still alive based on the stored SpiRecord resourceId in
the TransformRecord's IpSecConfig.

This check is unnecessary, as the SpiRecord has been subsumed into the
TransformRecord, and the kernel resources are kept alive whether or
not the SpiRecord is still held by the user.

This allows users of the IpSecManager API to allocate short-lived SPIs
during the creation of an IpSecTransform, without having to keep track
of both of them (even though the SPI is no longer usable).

The TransformRecord.getSpiRecord() call is already used in
multiple other places in the same method.

Bug: 142072071
Test: New tests added, passing.
Change-Id: I1959f3080946267243564459ff4207647922566e
Merged-In: I1959f3080946267243564459ff4207647922566e
(cherry picked from commit 5258b1b82f39bf17e0751bcb94479464250aaec5)
2020-05-08 00:01:45 -07:00
Chalard Jean
0cea734020 Merge "Fix a bug where a spurious capabilities callback is sent." am: 0d4995dcb7 am: 4726fe863c am: 5cc55c46d0 am: 490480eb0f
Change-Id: I638f2a8862f15c09466bd476ff8d5e3eb76897e3
2020-05-08 02:03:30 +00:00
Chalard Jean
490480eb0f Merge "Fix a bug where a spurious capabilities callback is sent." am: 0d4995dcb7 am: 4726fe863c am: 5cc55c46d0
Change-Id: I614b2b8f303c90828f048a31d382b2f628ece8de
2020-05-08 01:45:22 +00:00
Chalard Jean
5cc55c46d0 Merge "Fix a bug where a spurious capabilities callback is sent." am: 0d4995dcb7 am: 4726fe863c
Change-Id: Ied089ed5ca553b206bdb3f7195f9e623aaabfa00
2020-05-08 01:33:13 +00:00
Chalard Jean
4726fe863c Merge "Fix a bug where a spurious capabilities callback is sent." am: 0d4995dcb7
Change-Id: Ide91b1e5ce2fe17dd6c6b46644e0d30b47660b2f
2020-05-08 01:14:37 +00:00
Chalard Jean
0d4995dcb7 Merge "Fix a bug where a spurious capabilities callback is sent." 2020-05-08 00:49:33 +00:00
Sarah Chin
dd778cd5ef [automerger skipped] Merge "Added a new capability for temporarily unmetered network." am: c5c7994da9 am: 5581c36ff3 -s ours am: 2fcd85f62d -s ours am: bd3f35e5b4 -s ours
am skip reason: Change-Id I10e26cb0852e67f614e7b9c4e49f95e078602e21 with SHA-1 71863e9604 is in history

Change-Id: I4d8faea3916fe55ca25d4162893f22d004176116
2020-05-07 06:37:23 +00:00
Sarah Chin
bd3f35e5b4 [automerger skipped] Merge "Added a new capability for temporarily unmetered network." am: c5c7994da9 am: 5581c36ff3 -s ours am: 2fcd85f62d -s ours
am skip reason: Change-Id I10e26cb0852e67f614e7b9c4e49f95e078602e21 with SHA-1 71863e9604 is in history

Change-Id: I56c31471f54180a6e49cf1a72a1793618c5bec1c
2020-05-07 06:12:55 +00:00
Sarah Chin
2fcd85f62d [automerger skipped] Merge "Added a new capability for temporarily unmetered network." am: c5c7994da9 am: 5581c36ff3 -s ours
am skip reason: Change-Id I10e26cb0852e67f614e7b9c4e49f95e078602e21 with SHA-1 71863e9604 is in history

Change-Id: Ie43cc7dbddd5497dfa069fac5570a7a64eddb2a1
2020-05-07 06:12:02 +00:00
Sarah Chin
5581c36ff3 Merge "Added a new capability for temporarily unmetered network." am: c5c7994da9
Change-Id: I94eb37627875f96c7e70a5df9d273266bc4def66
2020-05-07 06:01:20 +00:00
Chalard Jean
d568791283 Fix a bug where a spurious capabilities callback is sent.
When a VPN connects and it has any underlying network (which
means almost always, because it will take the default network
if it doesn't declare any), it has default capabilities and
will only take the capabilities of its underlying network
as part of an update happening after making the network
available but before the rematch can take place. This in turn
causes the capabilities callback sent as part of the rematch
to be spuriously sent.

Test: FrameworksNetTests. Also tested together with a
      followup that adds tests with drive-by coverage for this.
Bug: 150570873
Change-Id: Id7d8bba486bada1a7ba5b0f152d2aa02e407f249
2020-05-07 12:07:03 +09: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
Treehugger Robot
3440941037 [automerger skipped] Merge "[SM10] Adopt helper class to monitor RAT type change per sub" am: f4a8f1f21e am: 7e92e7330c -s ours am: 75986b4623 -s ours am: 5ba5a0cd67 -s ours
am skip reason: Change-Id I45c3aa9046b316c8cd0943543d620a22e4afefd1 with SHA-1 c6081f9c50 is in history

Change-Id: I61304a3c61ea7c76a3012a27f8a0964abd32cc0a
2020-05-05 12:22:50 +00:00
Treehugger Robot
5ba5a0cd67 [automerger skipped] Merge "[SM10] Adopt helper class to monitor RAT type change per sub" am: f4a8f1f21e am: 7e92e7330c -s ours am: 75986b4623 -s ours
am skip reason: Change-Id I45c3aa9046b316c8cd0943543d620a22e4afefd1 with SHA-1 c6081f9c50 is in history

Change-Id: Ia28361c12804065aa4e0729f3e6283a7f4049101
2020-05-05 12:07:17 +00:00
Treehugger Robot
75986b4623 [automerger skipped] Merge "[SM10] Adopt helper class to monitor RAT type change per sub" am: f4a8f1f21e am: 7e92e7330c -s ours
am skip reason: Change-Id I45c3aa9046b316c8cd0943543d620a22e4afefd1 with SHA-1 c6081f9c50 is in history

Change-Id: I44a2ee47f6a88286b28d5165c67cfd4fdbdd0152
2020-05-05 11:54:36 +00:00
Treehugger Robot
7e92e7330c Merge "[SM10] Adopt helper class to monitor RAT type change per sub" am: f4a8f1f21e
Change-Id: Ifadf4ad62820c6cbf536a3984b1cf4a0b78cbc31
2020-05-05 11:32:31 +00:00
junyulai
d33735c952 [SM10] Adopt helper class to monitor RAT type change per sub
Test: atest NetworkStatsServiceTest
Bug: 146415925
Change-Id: I45c3aa9046b316c8cd0943543d620a22e4afefd1
Merged-In: I45c3aa9046b316c8cd0943543d620a22e4afefd1
(cherry picked from commit 219faff07bdc58c14fe58fc525e86383db1f8167)
2020-05-05 18:37:29 +08:00
Remi NGUYEN VAN
b6b3b77c60 Merge "Use the new NetworkStackConnector constructor" am: 062e45d48c am: d04dcdcea0 am: d624b40eaf am: 59e1240e94
Change-Id: If62c0b8d106549b9afc7b6a92c3b382e0f206653
2020-05-01 05:12:51 +00:00
Remi NGUYEN VAN
59e1240e94 Merge "Use the new NetworkStackConnector constructor" am: 062e45d48c am: d04dcdcea0 am: d624b40eaf
Change-Id: I6c8c0455cfd96f653e1080fc0b7265374e3a418d
2020-05-01 04:57:35 +00:00