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:
@@ -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 {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user