From 9d14206594c0b50a539ee73e37804542694937d6 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Wed, 12 Aug 2015 16:46:05 -0700 Subject: Update ifaces when global restriction changes. Global restriction of background data only applies to metered interfaces, but battery saver applies to all interfaces. In the very specific case where global background had been turned on while battery saver was enabled, we'd end up with a stale battery saver rule floating around. This change triggers an update of iface rules when the global restriction changes, giving us consistent behavior. Bug: 23098198 Change-Id: I454dc71cf11d50a2e9e6122e8a801ff17039b43a --- .../core/java/com/android/server/net/NetworkPolicyManagerService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'services') diff --git a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java index c0d0d13..5c1878e 100644 --- a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java +++ b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java @@ -1774,7 +1774,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { maybeRefreshTrustedTime(); synchronized (mRulesLock) { mRestrictBackground = restrictBackground; - updateRulesForGlobalChangeLocked(false); + updateRulesForGlobalChangeLocked(true); updateNotificationsLocked(); writePolicyLocked(); } -- cgit v1.1