am: d5c5c8f88b
* commit 'd5c5c8f88b5861557ca7a0ced764e45512b000c4':
Lock down networking when waiting for always-on
Change-Id: I50583a9738ac51378e5f5dcbbaa396f1aa30f97c
am: 43fbfbf94c
* commit '43fbfbf94c5b8ae4353b73c36d85ff02fd36fc67':
Lock down networking when waiting for always-on
Change-Id: I883c68faafde99eb00c37962a517dceb4a4f9d32
am: 39db67ab88
* commit '39db67ab882903220ac7f34d1febad17760681b0':
Lock down networking when waiting for always-on
Change-Id: I4160a61ca437d20df4342a44ed24fc6ad47962c6
am: f9773c5fdd
* commit 'f9773c5fdd952e0628bc4b0e80c55258b49335ad':
Lock down networking when waiting for always-on
Change-Id: I7be0a85597936421750d1da0fde3d55d7d4fabc5
am: 9355427d9a
* commit '9355427d9a1963764ec23e29e25f1230f9c83e31':
Make some of the UID-based VPN code reusable
Change-Id: I75d9871f8039d14f8d83be4696c3c4d4e864f9c0
am: 0ab7ea1701
* commit '0ab7ea1701b820c04f94edcc1ead61c9842a60bc':
Make some of the UID-based VPN code reusable
Change-Id: Ie7c88ba3eebe4af85a69f330cae3df3293113d4e
am: 89bf3e3aa2
* commit '89bf3e3aa2b3e95486445a50f4666a20b3d8e830':
Make some of the UID-based VPN code reusable
Change-Id: I3f1b1a08059aa58cb76db6cdd070b103024b9bf3
This stops Settings from telling the user detailed information, and
doesn't really protect anything secret -- privileged apps can already
tell that there's an active VPN by looking at network info.
Change-Id: I9c2a3cab6dff1b62e94a9e0735dccde226fd26a3
Fix: 28624328
When an UID is added / removed to the Data Saver blacklist, it's
necessary to notify internal components such as the Settings UI (which
was erroneously listening to UID rules changes instead).
BUG: 28743623
BUG: 28791717
Change-Id: I11c85e141dfe074ad390fd324309d2412bfbbd45
am: 492e99b2be
* commit '492e99b2bed9a09d42e8c2ce548aedd4974b73be':
Fixed connectivity state in some power saving scenarios.
Change-Id: Idd27e581b208a0d80d8fa6a4d7cf75eac82a32fd
am: cc02a95cbd
* commit 'cc02a95cbd694927cd70d7b0d7921d3f10300b38':
Fixed connectivity state in some power saving scenarios.
Change-Id: I9ce60e8520c041e1345960a51394f8477c4ac49e
am: bc26d925c6
* commit 'bc26d925c62968c0728a524a45c6e60f2b8fb781':
Fixed connectivity state in some power saving scenarios.
Change-Id: I7ebe3864657d2147034ffae400312e94deb5ef35
am: daabe978d4
* commit 'daabe978d40dce3feefb770558738cc1750d7fc3':
Make android_net_NetUtils include what it actually uses.
Change-Id: I775c03ba7fd3895c6525d3986b564b228d34063b
am: bdd12ec7b3
* commit 'bdd12ec7b3cb77dc29854cb8b6c2357aa4efb6ea':
Make android_net_NetUtils include what it actually uses.
Change-Id: I84a143e1922c7180a0a1926d2cfd87b59bca137d
By changing some member refs into arguments and having one of the
functions create the UID range instead of adding to mVpnUsers.
This will be useful for other layers of UID filtering like having
UIDs explicitly blocked from the VPN.
Deleted one broken line of code that cleared the status intent when
a restricted profile is removed. Other than that, this commit shouldn't
change any behaviour. If it does, that's a bug.
Bug: 26694104
Change-Id: Ieb656835d3282a8ba63cc3f12a80bfae166bcf44
NetworkPolicyManagerService (NPMS) manages 4 type of network restriction
when apps are running on background:
- Data Saver Mode (data usage restriction on metered-networks)
- Battery Saver Mode (power restriction on all networks)
- Doze Mode (power restriction on all networks)
- App Idle (power restriction on all networks)
These restrictions affects 2 parts of the system:
- Internal framework state on NPMS which is propagated to other internal
classes.
- External firewall rules (managed by netd).
Although each of the power-related restrictions have their own external firewall
rules, internally apps are whitelisted to them through the same
whitelist, and the current code is only updating the internal state (and
notifying the internal listeners) when Battery Saver Mode is on.
As a consequence of this problem, there are scenarios where an app
correctly does not have internet access (because the firewall rules are
properly set), but the NetworkInfo state returns the wrong state (like
CONNECTED / CONNECTED).
This CL fixes this problem by splitting the power-related logic from
updateRulesForRestrictBackgroundLocked() into its own
method (updateRulesForPowerRestrictionsLocked()), and making sure such
method is called whenever the firewall rules are updated.
Externally to this change, the CTS tests were also improved to verify
the apps get the proper connection state; it can be verified by running:
cts-tradefed run commandAndExit cts -m CtsHostsideNetworkTests \
-t com.android.cts.net.HostsideRestrictBackgroundNetworkTests
BUG: 28521946
Change-Id: Id5187eb7a59c549ef30e2b17627ae2d734afa789
am: 4247c46428
* commit '4247c464282bf8c9c458090f0e6b491cf9bc8c63':
Addressing API council comments on NetworkStatsManager.
Change-Id: Ie6455799758f0bdb67440f72c266effaf412e22f