am: bf53edcadb
* commit 'bf53edcadb236c407abf1ec5fd501419261f5e77':
Fixed enforceMeteredApnPolicy when Data Saver is on.
Change-Id: I62eb108dfad2ac1ffd2b541470f01a7923d92731
am: efd3a1749f
* commit 'efd3a1749f2737199643cc29bea6132a9786223b':
Fixed enforceMeteredApnPolicy when Data Saver is on.
Change-Id: I87b596346c058c7ac8efbebb67b43664f1be0fed
When enforceMeteredApnPolicy() is called when Data Saver mode is on and
the caller's UID is not whitelisted, it should add a
NET_CAPABILITY_NOT_METERED to the capabilities.
Change-Id: Ieed4f4a7634ee023ec58c91859263655e0ba62d4
Fixes: 28608499 (and https://code.google.com/p/android/issues/detail?id=208478)
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: 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
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: 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: 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: de224ba451
* commit 'de224ba451547fcc139ec6c565243e0f450ece46':
Addressing API council comments on NetworkStatsManager.
Change-Id: I1383b3c11653daaa3a0ca34600dbc7e28af24641
am: 6fe5aa1af4
* commit '6fe5aa1af45379cc93ec8456b2b947b3a0cfed4a':
Addressing API council comments on NetworkStatsManager.
Change-Id: Ia886e1ce98520c1618ba501097a2c979a628bbb4
am: dc5f558640
* commit 'dc5f558640da8785fabc274167ec37a0fda30cd6':
Addressing API council comments on NetworkStatsManager.
Change-Id: I952e69e7cfbd8cebcbac7c3b19ede300e26777e8
Callbacks
- DataUsageCallback renamed to UsageCallback
- DataUsagePolicy removed; passing in params directly to register method
- making it an abstract class
- passing in (networkType, subscriberId) that reached its threshold
- renaming onLimitReached to onThresholdReached to match existing naming
- only monitor single network,subscriberId
- no monitoring of specific uids; using device or user wide instead
Tags
- only owner uid can read its tags
- exposing only TAG_NONE to match service side
BUG: 27530098
Change-Id: I2b2664da71806868a1e937d2bf4d1f234637509b
am: 87d20317bf
* commit '87d20317bf26e87ef58798d3c5aafb81aa163788':
Fixed connectivity state in some restricted network scenarios.
Change-Id: Ifeb332fbf00c554b78d0ad724b34e3a8ebfc9894