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
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
am skip reason: Change-Id I10e26cb0852e67f614e7b9c4e49f95e078602e21 with SHA-1 71863e9604 is in history
Change-Id: I56c31471f54180a6e49cf1a72a1793618c5bec1c
am skip reason: Change-Id I10e26cb0852e67f614e7b9c4e49f95e078602e21 with SHA-1 71863e9604 is in history
Change-Id: Ie43cc7dbddd5497dfa069fac5570a7a64eddb2a1
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
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
am skip reason: Change-Id I45c3aa9046b316c8cd0943543d620a22e4afefd1 with SHA-1 c6081f9c50 is in history
Change-Id: Ia28361c12804065aa4e0729f3e6283a7f4049101
am skip reason: Change-Id I45c3aa9046b316c8cd0943543d620a22e4afefd1 with SHA-1 c6081f9c50 is in history
Change-Id: I44a2ee47f6a88286b28d5165c67cfd4fdbdd0152
am skip reason: Change-Id I2dbfc9bf7b2f785ea4594851bd354e9fd0fc0bd1 with SHA-1 3d3c9f7b76 is in history
Change-Id: I0bffe3f40347b1edcb802bd681b3584af4da3501
am skip reason: Change-Id I2dbfc9bf7b2f785ea4594851bd354e9fd0fc0bd1 with SHA-1 455b93d137 is in history
Change-Id: Ia099fdd063af5b9ccac85c4a32ed1337e21c2e54
am skip reason: Change-Id I2dbfc9bf7b2f785ea4594851bd354e9fd0fc0bd1 with SHA-1 455b93d137 is in history
Change-Id: Ie0d51de52ed26f4eabc0c0f6e72e4ec455b6a039
am skip reason: Change-Id I7e61a1612692db275b751330af5bacbf86836a8c with SHA-1 0fff1ed7b9 is in history
Change-Id: Ia983a0ef88d9b73920b14ea08a78e0ef542b8e1a
am skip reason: Change-Id I7e61a1612692db275b751330af5bacbf86836a8c with SHA-1 8e3914c162 is in history
Change-Id: I66a87a9180fed5faa463e3af7f4db529ceb2dab5
am skip reason: Change-Id I7e61a1612692db275b751330af5bacbf86836a8c with SHA-1 8e3914c162 is in history
Change-Id: I91f2a1820666357bffc974b0eab4e156e5d011a5