am 44e3a4cb: Merge "fix temp white list update in device idle" into mnc-dev
* commit '44e3a4cbfab5d1d3298540759feeb495016d2158': fix temp white list update in device idle
This commit is contained in:
@@ -2093,8 +2093,10 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
|
|||||||
for (UserInfo user : users) {
|
for (UserInfo user : users) {
|
||||||
for (int i = mPowerSaveTempWhitelistAppIds.size() - 1; i >= 0; i--) {
|
for (int i = mPowerSaveTempWhitelistAppIds.size() - 1; i >= 0; i--) {
|
||||||
int appId = mPowerSaveTempWhitelistAppIds.keyAt(i);
|
int appId = mPowerSaveTempWhitelistAppIds.keyAt(i);
|
||||||
|
boolean isAllow = mPowerSaveTempWhitelistAppIds.valueAt(i);
|
||||||
int uid = UserHandle.getUid(user.id, appId);
|
int uid = UserHandle.getUid(user.id, appId);
|
||||||
updateRulesForUidLocked(uid);
|
updateRulesForUidLocked(uid);
|
||||||
|
setUidFirewallRule(FIREWALL_CHAIN_DOZABLE, uid, !isAllow);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2190,11 +2192,6 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
|
|||||||
final boolean firewallReject = (uidRules & RULE_REJECT_ALL) != 0;
|
final boolean firewallReject = (uidRules & RULE_REJECT_ALL) != 0;
|
||||||
if (oldFirewallReject != firewallReject) {
|
if (oldFirewallReject != firewallReject) {
|
||||||
setUidFirewallRule(FIREWALL_CHAIN_STANDBY, uid, firewallReject);
|
setUidFirewallRule(FIREWALL_CHAIN_STANDBY, uid, firewallReject);
|
||||||
if (mFirewallChainStates.get(FIREWALL_CHAIN_DOZABLE) && !firewallReject) {
|
|
||||||
// if the dozable chain is on, and we decide to allow this uid. we need to punch
|
|
||||||
// a hole in the dozable chain.
|
|
||||||
setUidFirewallRule(FIREWALL_CHAIN_DOZABLE, uid, false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// dispatch changed rule to existing listeners
|
// dispatch changed rule to existing listeners
|
||||||
|
|||||||
Reference in New Issue
Block a user