Home
last modified time | relevance | path

Searched refs:limitBytes (Results 1 – 6 of 6) sorted by relevance

/frameworks/base/core/java/android/net/
DNetworkPolicy.java59 public long limitBytes = LIMIT_DISABLED; field in NetworkPolicy
80 long warningBytes, long limitBytes, boolean metered) { in NetworkPolicy() argument
81 this(template, cycleDay, cycleTimezone, warningBytes, limitBytes, SNOOZE_NEVER, in NetworkPolicy()
88 long warningBytes, long limitBytes, long lastWarningSnooze, long lastLimitSnooze, in NetworkPolicy() argument
91 limitBytes, lastWarningSnooze, lastLimitSnooze, metered, inferred); in NetworkPolicy()
96 long limitBytes, long lastWarningSnooze, long lastLimitSnooze, boolean metered, in NetworkPolicy() argument
98 this(template, cycleRule, warningBytes, limitBytes, lastWarningSnooze, lastLimitSnooze, in NetworkPolicy()
103 long limitBytes, long lastWarningSnooze, long lastLimitSnooze, long lastRapidSnooze, in NetworkPolicy() argument
108 this.limitBytes = limitBytes; in NetworkPolicy()
120 limitBytes = source.readLong(); in NetworkPolicy()
[all …]
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/
DNetworkPolicyEditor.java67 if (policy.limitBytes < -1) { in read()
68 policy.limitBytes = LIMIT_DISABLED; in read()
101 return policy != null && policy.limitBytes != LIMIT_DISABLED; in hasLimitedPolicy()
183 long limitBytes = getPolicyLimitBytes(template); in setPolicyWarningBytes() local
186 (limitBytes == LIMIT_DISABLED) ? warningBytes : Math.min(warningBytes, limitBytes); in setPolicyWarningBytes()
193 return (policy != null) ? policy.limitBytes : LIMIT_DISABLED; in getPolicyLimitBytes()
197 public void setPolicyLimitBytes(NetworkTemplate template, long limitBytes) { in setPolicyLimitBytes() argument
200 if (warningBytes > limitBytes && limitBytes != LIMIT_DISABLED) { in setPolicyLimitBytes()
201 setPolicyWarningBytesInner(template, limitBytes); in setPolicyLimitBytes()
205 policy.limitBytes = limitBytes; in setPolicyLimitBytes()
/frameworks/base/services/core/java/com/android/server/net/
DNetworkPolicyManagerService.java1224 if (notifyRapid && policy.limitBytes != LIMIT_DISABLED) {
1232 final long alertBytes = (policy.limitBytes * 3) / 2;
1420 final long overBytes = totalBytes - policy.limitBytes; in enqueueNotification()
1637 long limitBytes = in getLimitBytesFromCarrierConfig() local
1640 if (limitBytes == DATA_CYCLE_THRESHOLD_DISABLED) { in getLimitBytesFromCarrierConfig()
1642 } else if (limitBytes == DATA_CYCLE_USE_PLATFORM_DEFAULT) { in getLimitBytesFromCarrierConfig()
1644 } else if (limitBytes < 0) { in getLimitBytesFromCarrierConfig()
1647 + "non-negative value but got: " + limitBytes); in getLimitBytesFromCarrierConfig()
1650 return limitBytes; in getLimitBytesFromCarrierConfig()
1724 if (policy.limitBytes == LIMIT_DISABLED || !policy.hasCycle()) { in updateNetworkEnabledNL()
[all …]
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/net/
DDataUsageController.java149 usage.limitLevel = policy.limitBytes > 0 ? policy.limitBytes : 0; in getDataUsageInfo()
/frameworks/base/services/core/java/com/android/server/connectivity/
DMultipathPolicyTracker.java275 private long getRemainingDailyBudget(long limitBytes, in getRemainingDailyBudget() argument
280 final long remainingBytes = totalBytes == -1 ? 0 : Math.max(0, limitBytes - totalBytes); in getRemainingDailyBudget()
419 ? policy.limitBytes in getActiveLimit()
/frameworks/base/services/tests/servicestests/src/com/android/server/net/
DNetworkPolicyManagerServiceTest.java434 mDefaultLimitBytes = defaultPolicy.limitBytes; in callSystemReady()
1886 private SubscriptionPlan buildMonthlyDataPlan(ZonedDateTime start, long limitBytes) { in buildMonthlyDataPlan() argument
1889 .setDataLimit(limitBytes, LIMIT_BEHAVIOR_DISABLED) in buildMonthlyDataPlan()
1933 long limitBytes, boolean inferred) { in buildFakeMobilePolicy() argument
1936 limitBytes, SNOOZE_NEVER, SNOOZE_NEVER, true, inferred); in buildFakeMobilePolicy()