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
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: ffeacedc35
* commit 'ffeacedc355fe9dd8b331a27294eac5dea813e5b':
Fixed connectivity state in some restricted network scenarios.
Change-Id: I1bc51c4a06dad9245ce0ed884707855b2c04edf1