Home
last modified time | relevance | path

Searched refs:warningBytes (Results 1 – 9 of 9) sorted by relevance

/packages/apps/Settings/tests/robotests/src/com/android/settings/datausage/
DDataUsageInfoControllerTest.java85 long warningBytes = -1; in getDefaultNetworkPolicy() local
87 return new NetworkPolicy(template, cycleDay, cycleTimezone, warningBytes, limitBytes, true); in getDefaultNetworkPolicy()
100 policy.warningBytes = NEGATIVE; in testNegativeWarning_UpdatedToZero()
108 policy.warningBytes = ZERO; in testWarningZero_UpdatedToZero()
116 policy.warningBytes = POSITIVE_SMALL; in testWarningPositive_UpdatedToWarning()
118 assertThat(info.warningLevel).isEqualTo(policy.warningBytes); in testWarningPositive_UpdatedToWarning()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/datausage/
DChartDataUsagePreference.java86 mPolicy != null ? Math.max(mPolicy.limitBytes, mPolicy.warningBytes) : 0; in getTop()
139 if (policy.warningBytes != NetworkPolicy.WARNING_DISABLED) { in bindNetworkPolicy()
140 chart.setDividerLoc((int) (policy.warningBytes / RESOLUTION)); in bindNetworkPolicy()
141 float weight = policy.warningBytes / RESOLUTION / (float) top; in bindNetworkPolicy()
145 labels[1] = getLabel(policy.warningBytes, R.string.data_usage_sweep_warning, in bindNetworkPolicy()
DBillingCycleSettings.java134 final long warningBytes = services.mPolicyEditor.getPolicyWarningBytes(mNetworkTemplate); in updatePrefs() local
135 if (warningBytes != WARNING_DISABLED) { in updatePrefs()
136 mDataWarning.setSummary(DataUsageUtils.formatDataUsage(getContext(), warningBytes)); in updatePrefs() local
216 private void setPolicyWarningBytes(long warningBytes) { in setPolicyWarningBytes() argument
218 services.mPolicyEditor.setPolicyWarningBytes(mNetworkTemplate, warningBytes); in setPolicyWarningBytes()
432 final long minLimitBytes = (long) (policy.warningBytes * FLOAT); in show()
DDataUsageInfoController.java32 if (policy.warningBytes >= 0) { in updateDataLimit()
33 info.warningLevel = policy.warningBytes; in updateDataLimit()
/packages/apps/Settings/src/com/android/settings/datausage/
DChartDataUsagePreference.java86 mPolicy != null ? Math.max(mPolicy.limitBytes, mPolicy.warningBytes) : 0; in getTop()
139 if (policy.warningBytes != NetworkPolicy.WARNING_DISABLED) { in bindNetworkPolicy()
140 chart.setDividerLoc((int) (policy.warningBytes / RESOLUTION)); in bindNetworkPolicy()
141 float weight = policy.warningBytes / RESOLUTION / (float) top; in bindNetworkPolicy()
145 labels[1] = getLabel(policy.warningBytes, R.string.data_usage_sweep_warning, in bindNetworkPolicy()
DBillingCycleSettings.java134 final long warningBytes = services.mPolicyEditor.getPolicyWarningBytes(mNetworkTemplate); in updatePrefs() local
135 if (warningBytes != WARNING_DISABLED) { in updatePrefs()
136 mDataWarning.setSummary(DataUsageUtils.formatDataUsage(getContext(), warningBytes)); in updatePrefs() local
216 private void setPolicyWarningBytes(long warningBytes) { in setPolicyWarningBytes() argument
218 services.mPolicyEditor.setPolicyWarningBytes(mNetworkTemplate, warningBytes); in setPolicyWarningBytes()
432 final long minLimitBytes = (long) (policy.warningBytes * FLOAT); in show()
DDataUsageInfoController.java32 if (policy.warningBytes >= 0) { in updateDataLimit()
33 info.warningLevel = policy.warningBytes; in updateDataLimit()
/packages/apps/Car/Settings/src/com/android/car/settings/datausage/
DDataWarningPreferenceController.java77 long warningBytes = getNetworkPolicyEditor().getPolicyWarningBytes(getNetworkTemplate()); in updateState() local
78 if (warningBytes == WARNING_DISABLED) { in updateState()
83 DataUsageUtils.bytesToIecUnits(getContext(), warningBytes)); in updateState() local
DDataLimitPreferenceController.java127 long warningBytes = getNetworkPolicyEditor().getPolicyWarningBytes(getNetworkTemplate()); in onConfirm() local
129 if (warningBytes != WARNING_DISABLED) { in onConfirm()
130 minLimitBytes = (long) (warningBytes * LIMIT_BYTES_MULTIPLIER); in onConfirm()