Merge "Fixed enforceMeteredApnPolicy when Data Saver is on." into nyc-dev
am: efd3a1749f * commit 'efd3a1749f2737199643cc29bea6132a9786223b': Fixed enforceMeteredApnPolicy when Data Saver is on. Change-Id: I87b596346c058c7ac8efbebb67b43664f1be0fed
This commit is contained in:
commit
bf53edcadb
1 changed files with 2 additions and 1 deletions
|
|
@ -4066,7 +4066,8 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||
synchronized(mRulesLock) {
|
||||
uidRules = mUidRules.get(uid, RULE_ALLOW_ALL);
|
||||
}
|
||||
if ((uidRules & RULE_ALLOW_ALL) == 0) {
|
||||
if (mRestrictBackground && (uidRules & RULE_ALLOW_METERED) == 0
|
||||
&& (uidRules & RULE_TEMPORARY_ALLOW_METERED) == 0) {
|
||||
// we could silently fail or we can filter the available nets to only give
|
||||
// them those they have access to. Chose the more useful option.
|
||||
networkCapabilities.addCapability(NET_CAPABILITY_NOT_METERED);
|
||||
|
|
|
|||
Loading…
Reference in a new issue