More data usage chart iteration, app details.
Moved app details back into single Fragment to support animations and template tabs. Show the network in background behind app details chart series to match designs. Clamping sweeps at axis boundaries. Bug: 4813014, 4598460, 4818029 Change-Id: I72c0b21ee1d595e4da31d293ae0dab9e801041f3
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
|
||||
package com.android.settings.net;
|
||||
|
||||
import static android.net.NetworkPolicy.LIMIT_DISABLED;
|
||||
import static android.net.NetworkPolicy.WARNING_DISABLED;
|
||||
import static android.net.NetworkTemplate.MATCH_MOBILE_3G_LOWER;
|
||||
import static android.net.NetworkTemplate.MATCH_MOBILE_4G;
|
||||
import static android.net.NetworkTemplate.MATCH_MOBILE_ALL;
|
||||
@@ -51,6 +53,14 @@ public class NetworkPolicyEditor {
|
||||
final NetworkPolicy[] policies = mPolicyService.getNetworkPolicies();
|
||||
mPolicies.clear();
|
||||
for (NetworkPolicy policy : policies) {
|
||||
// TODO: find better place to clamp these
|
||||
if (policy.limitBytes < -1) {
|
||||
policy.limitBytes = LIMIT_DISABLED;
|
||||
}
|
||||
if (policy.warningBytes < -1) {
|
||||
policy.warningBytes = WARNING_DISABLED;
|
||||
}
|
||||
|
||||
mPolicies.add(policy);
|
||||
}
|
||||
} catch (RemoteException e) {
|
||||
|
Reference in New Issue
Block a user