Reinforce limited networks in data usage UI.

When restricting background data, list the networks the restriction
applies to.

Bug: 5131685, 5058106
Change-Id: Idde084dfa5ac6313a8d145cb6f2603aedb154590
This commit is contained in:
Jeff Sharkey
2011-08-17 15:08:12 -07:00
parent 96bc051377
commit 30dde0f5a0
4 changed files with 63 additions and 16 deletions

View File

@@ -91,6 +91,11 @@ public class NetworkPolicyEditor {
}
}
public boolean hasLimitedPolicy(NetworkTemplate template) {
final NetworkPolicy policy = getPolicy(template);
return policy != null && policy.limitBytes != LIMIT_DISABLED;
}
public NetworkPolicy getPolicy(NetworkTemplate template) {
for (NetworkPolicy policy : mPolicies) {
if (policy.template.equals(template)) {
@@ -179,5 +184,4 @@ public class NetworkPolicyEditor {
}
}
}