Commit Graph

10124 Commits

Author SHA1 Message Date
Automerger Merge Worker
09d264f306 [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 d06d390b20 is in history

Change-Id: I0ea68069cd9e07bf2d95b14452046fdb63613782
2020-05-12 21:03:36 +00:00
TreeHugger Robot
69b2c644c6 [automerger skipped] Merge changes I37dd459d,I1959f308 into rvc-dev am: 0cd6d1cb70 am: e9c51564aa -s ours
am skip reason: Change-Id I37dd459d08b57b14f72f3b28ea80fa231b152f10 with SHA-1 d06d390b20 is in history

Change-Id: Ib9aaf9091937ae27f35a389cc3de696567cefe1b
2020-05-12 20:46:55 +00:00
Benedict Wong
c9900c03c2 [automerger skipped] Use TransformRecord to get SPI instead of SpiRecord am: c6cdcbfa83 am: a4d2cac578 -s ours
am skip reason: Change-Id I1959f3080946267243564459ff4207647922566e with SHA-1 1425cf5655 is in history

Change-Id: Id31a417c7a4204bd646400e90456424d12d2d9d0
2020-05-12 20:46:52 +00:00
TreeHugger Robot
e9c51564aa Merge changes I37dd459d,I1959f308 into rvc-dev am: 0cd6d1cb70
Change-Id: Ie0c5a3c7bfc16edf98203212b8a1e7e4e8b302b9
2020-05-12 20:45:01 +00:00
Benedict Wong
a4d2cac578 Use TransformRecord to get SPI instead of SpiRecord am: c6cdcbfa83
Change-Id: I011543293623240b5652ac9818b0b3f28a397e97
2020-05-12 20:44:59 +00:00
Automerger Merge Worker
29638bc032 Merge "Merge "Create TestApi for simulating a Data Stall on ConnectivityService." am: 727f0d1d44 am: 1d81e3c69e" into rvc-dev-plus-aosp am: abd8340a70 am: a1424e18bc
Change-Id: I17ddf91a95c9f1e73fbbd0fac62851d139732be1
2020-05-12 18:25:39 +00:00
Cody Kesting
e0336ca4d6 Merge "Set owner and administrator UIDs for test networks." am: eb44b7b1bb am: e4e48c22c5 am: 51edeeeb65 am: 88d1b83af6
Change-Id: I4e3b94372ad788ecefe270d6ca18b611b3463bf5
2020-05-12 18:24:54 +00:00
Automerger Merge Worker
a1424e18bc Merge "Merge "Create TestApi for simulating a Data Stall on ConnectivityService." am: 727f0d1d44 am: 1d81e3c69e" into rvc-dev-plus-aosp am: abd8340a70
Change-Id: I1860d59ed83e14337564d8db248fc5b0e6581120
2020-05-12 17:51:24 +00:00
Cody Kesting
88d1b83af6 Merge "Set owner and administrator UIDs for test networks." am: eb44b7b1bb am: e4e48c22c5 am: 51edeeeb65
Change-Id: I0d467e1fd02995cf2fe4c3f41e0ea78d4f2be9e2
2020-05-12 17:50:24 +00:00
Cody Kesting
59827dcf92 Merge "Create TestApi for simulating a Data Stall on ConnectivityService." am: 727f0d1d44 am: 1d81e3c69e
Change-Id: I17839cd271d984f76c203889293cc51375bb8bcb
2020-05-12 17:27:09 +00:00
Cody Kesting
51edeeeb65 Merge "Set owner and administrator UIDs for test networks." am: eb44b7b1bb am: e4e48c22c5
Change-Id: I7af702ff5eafbd0f5bb2247e0debf975e51accd1
2020-05-12 17:26:44 +00:00
Cody Kesting
1d81e3c69e Merge "Create TestApi for simulating a Data Stall on ConnectivityService." am: 727f0d1d44
Change-Id: Ie14ab9cbcf8f7b291fb88f4b4abedab1b5978c3e
2020-05-12 17:10:10 +00:00
Cody Kesting
e4e48c22c5 Merge "Set owner and administrator UIDs for test networks." am: eb44b7b1bb
Change-Id: I3b1c29b30912c4dddc3524a9a28fb3ad8c3ac318
2020-05-12 17:09:14 +00:00
Cody Kesting
727f0d1d44 Merge "Create TestApi for simulating a Data Stall on ConnectivityService." 2020-05-12 16:52:35 +00:00
Cody Kesting
eb44b7b1bb Merge "Set owner and administrator UIDs for test networks." 2020-05-12 16:52:07 +00:00
Remi NGUYEN VAN
45a44afd6d Merge "Send full LinkProperties to NetworkMonitor" am: 7d8b7603ab am: 16192b71ae am: 52fcc84889 am: 29dcdb4d05
Change-Id: I76892cd7739d2a72487f294c634967835848059d
2020-05-12 09:20:45 +00:00
Remi NGUYEN VAN
29dcdb4d05 Merge "Send full LinkProperties to NetworkMonitor" am: 7d8b7603ab am: 16192b71ae am: 52fcc84889
Change-Id: Ib9e859e427e737afe04d06482db5a50803822b6f
2020-05-12 09:05:40 +00:00
Remi NGUYEN VAN
52fcc84889 Merge "Send full LinkProperties to NetworkMonitor" am: 7d8b7603ab am: 16192b71ae
Change-Id: I7e81f65e4b8f22a646dba191748133841a569d44
2020-05-12 08:53:53 +00:00
Remi NGUYEN VAN
16192b71ae Merge "Send full LinkProperties to NetworkMonitor" am: 7d8b7603ab
Change-Id: Ib33f33a1998b61b980315e7278162e57f8f56cf2
2020-05-12 08:37:41 +00:00
Remi NGUYEN VAN
7d8b7603ab Merge "Send full LinkProperties to NetworkMonitor" 2020-05-12 08:13:05 +00:00
Chalard Jean
e857684f7d Merge "Fix a bug where VPNs start out suspended on cellular" am: bd3a7f994d am: cbb9c78350 am: 986a8a1b76 am: 57ba9149dc
Change-Id: Ib63e5ce0f1e986c7d4bd4895e36a34ef94f62a57
2020-05-11 05:25:52 +00:00
Chalard Jean
57ba9149dc Merge "Fix a bug where VPNs start out suspended on cellular" am: bd3a7f994d am: cbb9c78350 am: 986a8a1b76
Change-Id: I7b21a5ba0e1d3bd15c8c1c0a33091955d67c5d86
2020-05-11 05:15:00 +00:00
Chalard Jean
986a8a1b76 Merge "Fix a bug where VPNs start out suspended on cellular" am: bd3a7f994d am: cbb9c78350
Change-Id: I368308ded731b221be7fae6ddf1723c587ae4d20
2020-05-11 04:59:35 +00:00
Chalard Jean
cbb9c78350 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
91a1beddcc 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
3b1d8b491d 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
ad72d21a53 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 d06d390b20)
2020-05-08 00:01:59 -07:00
Benedict Wong
c6cdcbfa83 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 1425cf5655)
2020-05-08 00:01:45 -07:00
Chalard Jean
f788a488fa Merge "Fix a bug where a spurious capabilities callback is sent." am: a4a379d6c9 am: fbf7472187 am: 3cfa50040f am: eb1b770994
Change-Id: I638f2a8862f15c09466bd476ff8d5e3eb76897e3
2020-05-08 02:03:30 +00:00
Chalard Jean
eb1b770994 Merge "Fix a bug where a spurious capabilities callback is sent." am: a4a379d6c9 am: fbf7472187 am: 3cfa50040f
Change-Id: I614b2b8f303c90828f048a31d382b2f628ece8de
2020-05-08 01:45:22 +00:00
Chalard Jean
3cfa50040f Merge "Fix a bug where a spurious capabilities callback is sent." am: a4a379d6c9 am: fbf7472187
Change-Id: Ied089ed5ca553b206bdb3f7195f9e623aaabfa00
2020-05-08 01:33:13 +00:00
Chalard Jean
fbf7472187 Merge "Fix a bug where a spurious capabilities callback is sent." am: a4a379d6c9
Change-Id: Ide91b1e5ce2fe17dd6c6b46644e0d30b47660b2f
2020-05-08 01:14:37 +00:00
Chalard Jean
a4a379d6c9 Merge "Fix a bug where a spurious capabilities callback is sent." 2020-05-08 00:49:33 +00:00
Sarah Chin
f170e986e9 [automerger skipped] Merge "Added a new capability for temporarily unmetered network." am: c5c7994da9 am: 9344d8b677 -s ours am: 46e090d222 -s ours am: 3b2d29fd62 -s ours
am skip reason: Change-Id I10e26cb0852e67f614e7b9c4e49f95e078602e21 with SHA-1 2bd176d185 is in history

Change-Id: I4d8faea3916fe55ca25d4162893f22d004176116
2020-05-07 06:37:23 +00:00
Sarah Chin
3b2d29fd62 [automerger skipped] Merge "Added a new capability for temporarily unmetered network." am: c5c7994da9 am: 9344d8b677 -s ours am: 46e090d222 -s ours
am skip reason: Change-Id I10e26cb0852e67f614e7b9c4e49f95e078602e21 with SHA-1 2bd176d185 is in history

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

Change-Id: Ie43cc7dbddd5497dfa069fac5570a7a64eddb2a1
2020-05-07 06:12:02 +00:00
Sarah Chin
9344d8b677 Merge "Added a new capability for temporarily unmetered network." am: c5c7994da9
Change-Id: I94eb37627875f96c7e70a5df9d273266bc4def66
2020-05-07 06:01:20 +00:00
Chalard Jean
8c5e45895d 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
d089298a81 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
baf7c9fe74 [automerger skipped] Merge "[SM10] Adopt helper class to monitor RAT type change per sub" am: f4a8f1f21e am: b161e1b28c -s ours am: 1fc03490f0 -s ours am: d4bc8f92ce -s ours
am skip reason: Change-Id I45c3aa9046b316c8cd0943543d620a22e4afefd1 with SHA-1 b55cb0a7d0 is in history

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

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

Change-Id: I44a2ee47f6a88286b28d5165c67cfd4fdbdd0152
2020-05-05 11:54:36 +00:00
Treehugger Robot
b161e1b28c 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
5e3d346655 [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 9f2e38da19)
2020-05-05 18:37:29 +08:00
Remi NGUYEN VAN
a14d3e90ac Merge "Use the new NetworkStackConnector constructor" am: e294fb81c7 am: 23687eceeb am: 2fff694481 am: dab917bd65
Change-Id: If62c0b8d106549b9afc7b6a92c3b382e0f206653
2020-05-01 05:12:51 +00:00
Remi NGUYEN VAN
dab917bd65 Merge "Use the new NetworkStackConnector constructor" am: e294fb81c7 am: 23687eceeb am: 2fff694481
Change-Id: I6c8c0455cfd96f653e1080fc0b7265374e3a418d
2020-05-01 04:57:35 +00:00
Remi NGUYEN VAN
2fff694481 Merge "Use the new NetworkStackConnector constructor" am: e294fb81c7 am: 23687eceeb
Change-Id: I6bf23b1716706aaa757170ec3a60062ff4fcb1e0
2020-05-01 04:47:17 +00:00
Remi NGUYEN VAN
23687eceeb Merge "Use the new NetworkStackConnector constructor" am: e294fb81c7
Change-Id: Ifaef8916460a4c3c275b9cdf20ee87b562a42785
2020-05-01 04:30:38 +00:00
Remi NGUYEN VAN
e294fb81c7 Merge "Use the new NetworkStackConnector constructor" 2020-05-01 04:19:29 +00:00
Remi NGUYEN VAN
446abb69e9 [automerger skipped] Merge "Add comment / logging in NetworkMonitor callbacks" into rvc-dev am: 84b2ea7aee -s ours am: abc269eb0c -s ours am: 68ed77c6ff -s ours
am skip reason: Change-Id I2dbfc9bf7b2f785ea4594851bd354e9fd0fc0bd1 with SHA-1 1551881b14 is in history

Change-Id: I5597f01d49bdc471e6ae4fcd52b1e31bf9b0f112
2020-05-01 01:18:04 +00:00