Home
last modified time | relevance | path

Searched refs:mPolicyEditor (Results 1 – 23 of 23) sorted by relevance

/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/datausage/
DDataLimitPreferenceControllerTest.java64 private NetworkPolicyEditor mPolicyEditor; field in DataLimitPreferenceControllerTest
87 mController.setNetworkPolicyEditor(mPolicyEditor); in setUp()
94 when(mPolicyEditor.getPolicyLimitBytes(mNetworkTemplate)).thenReturn(LIMIT_DISABLED); in refreshUi_limitDisabled_summaryEmpty()
102 when(mPolicyEditor.getPolicyLimitBytes(mNetworkTemplate)).thenReturn(LIMIT_DISABLED); in refreshUi_limitDisabled_preferenceDisabled()
110 when(mPolicyEditor.getPolicyLimitBytes(mNetworkTemplate)).thenReturn(LIMIT_DISABLED); in refreshUi_limitDisabled_switchUnchecked()
118 when(mPolicyEditor.getPolicyLimitBytes(mNetworkTemplate)).thenReturn(5 * GIB_IN_BYTES); in refreshUi_limitEnabled_summaryPopulated()
126 when(mPolicyEditor.getPolicyLimitBytes(mNetworkTemplate)).thenReturn(5 * GIB_IN_BYTES); in refreshUi_limitEnabled_preferenceEnabled()
134 when(mPolicyEditor.getPolicyLimitBytes(mNetworkTemplate)).thenReturn(5 * GIB_IN_BYTES); in refreshUi_limitEnabled_switchChecked()
143 verify(mPolicyEditor).setPolicyLimitBytes(mNetworkTemplate, LIMIT_DISABLED); in onPreferenceChanged_toggleFalse_limitBytesDisabled()
158 verify(mPolicyEditor).setPolicyLimitBytes(mNetworkTemplate, 5 * GIB_IN_BYTES); in onDialogConfirm_noWarningThreshold_setsLimitTo5GB()
[all …]
DDataWarningPreferenceControllerTest.java62 private NetworkPolicyEditor mPolicyEditor; field in DataWarningPreferenceControllerTest
85 mController.setNetworkPolicyEditor(mPolicyEditor); in setUp()
92 when(mPolicyEditor.getPolicyWarningBytes(mNetworkTemplate)).thenReturn(WARNING_DISABLED); in refreshUi_warningDisabled_summaryEmpty()
100 when(mPolicyEditor.getPolicyWarningBytes(mNetworkTemplate)).thenReturn(WARNING_DISABLED); in refreshUi_warningDisabled_preferenceDisabled()
108 when(mPolicyEditor.getPolicyWarningBytes(mNetworkTemplate)).thenReturn(WARNING_DISABLED); in refreshUi_warningDisabled_switchUnchecked()
116 when(mPolicyEditor.getPolicyWarningBytes(mNetworkTemplate)).thenReturn( in refreshUi_warningEnabled_summaryPopulated()
125 when(mPolicyEditor.getPolicyWarningBytes(mNetworkTemplate)).thenReturn( in refreshUi_warningEnabled_preferenceEnabled()
134 when(mPolicyEditor.getPolicyWarningBytes(mNetworkTemplate)).thenReturn( in refreshUi_warningEnabled_switchChecked()
144 verify(mPolicyEditor).setPolicyWarningBytes(mNetworkTemplate, WARNING_DISABLED); in onPreferenceChanged_toggleFalse_warningBytesDisabled()
152 verify(mPolicyEditor).setPolicyWarningBytes(eq(mNetworkTemplate), setWarning.capture()); in onPreferenceChanged_toggleTrue_warningBytesNotDisabled()
DCycleResetDayOfMonthPickerPreferenceControllerTest.java52 private NetworkPolicyEditor mPolicyEditor; field in CycleResetDayOfMonthPickerPreferenceControllerTest
65 mControllerHelper.getController().setNetworkPolicyEditor(mPolicyEditor); in setUp()
73 when(mPolicyEditor.getPolicyCycleDay(mNetworkTemplate)).thenReturn(startingValue); in performClick_startsDialogWithStartingValue()
/packages/apps/Car/Settings/src/com/android/car/settings/datausage/
DDataWarningAndLimitFragment.java41 private NetworkPolicyEditor mPolicyEditor; field in DataWarningAndLimitFragment
66 mPolicyEditor = new NetworkPolicyEditor(NetworkPolicyManager.from(context)); in onAttach()
77 mPolicyEditor.read(); in onAttach()
88 preferenceController.setNetworkPolicyEditor(mPolicyEditor); in onAttach()
DAppDataUsageFragment.java53 private NetworkPolicyEditor mPolicyEditor; field in AppDataUsageFragment
91 mPolicyEditor = new NetworkPolicyEditor(NetworkPolicyManager.from(context)); in onAttach()
115 NetworkPolicy policy = mPolicyEditor.getPolicy(mNetworkTemplate); in getBundleForNetworkStats()
/packages/apps/Settings/src/com/android/settings/datausage/
DBillingCycleSettings.java92 services.mPolicyEditor = policyEditor; in setUpForTest()
134 final long warningBytes = services.mPolicyEditor.getPolicyWarningBytes(mNetworkTemplate); in updatePrefs()
144 final long limitBytes = services.mPolicyEditor.getPolicyLimitBytes(mNetworkTemplate); in updatePrefs()
212 services.mPolicyEditor.setPolicyLimitBytes(mNetworkTemplate, limitBytes); in setPolicyLimitBytes()
218 services.mPolicyEditor.setPolicyWarningBytes(mNetworkTemplate, warningBytes); in setPolicyWarningBytes()
224 return services.mPolicyEditor; in getNetworkPolicyEditor()
427 final NetworkPolicy policy = parent.services.mPolicyEditor in show()
DDataUsageSummaryPreferenceController.java74 protected final NetworkPolicyEditor mPolicyEditor; field in DataUsageSummaryPreferenceController
119 mPolicyEditor = new NetworkPolicyEditor(policyManager); in DataUsageSummaryPreferenceController()
158 mPolicyEditor = policyEditor; in DataUsageSummaryPreferenceController()
205 mDataInfoController.updateDataLimit(info, mPolicyEditor.getPolicy(mDefaultTemplate)); in updateState()
DDataUsageBaseFragment.java52 services.mPolicyEditor = new NetworkPolicyEditor(services.mPolicyManager); in onCreate()
62 services.mPolicyEditor.read(); in onResume()
DTemplatePreference.java38 NetworkPolicyEditor mPolicyEditor; field in TemplatePreference.NetworkServices
DWifiDataUsageSummaryPreferenceController.java58 mDataInfoController.updateDataLimit(info, mPolicyEditor.getPolicy(template)); in updateState()
DBillingCyclePreferenceController.java56 services.mPolicyEditor = new NetworkPolicyEditor(services.mPolicyManager); in displayPreference()
DDataUsageSummary.java240 return services.mPolicyEditor; in getNetworkPolicyEditor()
DDataUsageList.java283 final NetworkPolicy policy = services.mPolicyEditor.getPolicy(mTemplate); in updatePolicy()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/datausage/
DBillingCycleSettings.java92 services.mPolicyEditor = policyEditor; in setUpForTest()
134 final long warningBytes = services.mPolicyEditor.getPolicyWarningBytes(mNetworkTemplate); in updatePrefs()
144 final long limitBytes = services.mPolicyEditor.getPolicyLimitBytes(mNetworkTemplate); in updatePrefs()
212 services.mPolicyEditor.setPolicyLimitBytes(mNetworkTemplate, limitBytes); in setPolicyLimitBytes()
218 services.mPolicyEditor.setPolicyWarningBytes(mNetworkTemplate, warningBytes); in setPolicyWarningBytes()
224 return services.mPolicyEditor; in getNetworkPolicyEditor()
427 final NetworkPolicy policy = parent.services.mPolicyEditor in show()
DDataUsageSummaryPreferenceController.java71 protected final NetworkPolicyEditor mPolicyEditor; field in DataUsageSummaryPreferenceController
116 mPolicyEditor = new NetworkPolicyEditor(policyManager); in DataUsageSummaryPreferenceController()
155 mPolicyEditor = policyEditor; in DataUsageSummaryPreferenceController()
202 mDataInfoController.updateDataLimit(info, mPolicyEditor.getPolicy(mDefaultTemplate)); in updateState()
DDataUsageBaseFragment.java52 services.mPolicyEditor = new NetworkPolicyEditor(services.mPolicyManager); in onCreate()
62 services.mPolicyEditor.read(); in onResume()
DTemplatePreference.java38 NetworkPolicyEditor mPolicyEditor; field in TemplatePreference.NetworkServices
DWifiDataUsageSummaryPreferenceController.java59 mDataInfoController.updateDataLimit(info, mPolicyEditor.getPolicy(template)); in updateState()
DBillingCyclePreferenceController.java56 services.mPolicyEditor = new NetworkPolicyEditor(services.mPolicyManager); in displayPreference()
DDataUsageSummary.java251 return services.mPolicyEditor; in getNetworkPolicyEditor()
DDataUsageList.java280 final NetworkPolicy policy = services.mPolicyEditor.getPolicy(mTemplate); in updatePolicy()
/packages/apps/Settings/tests/robotests/src/com/android/settings/datausage/
DDataUsageSummaryPreferenceControllerTest.java85 private NetworkPolicyEditor mPolicyEditor; field in DataUsageSummaryPreferenceControllerTest
134 mPolicyEditor, in setUp()
362 mPolicyEditor, in testMobileData_preferenceAvailable()
376 mPolicyEditor, in testMobileData_noSimNoWifi_preferenceDisabled()
393 mPolicyEditor, in testMobileData_noSimWifi_preferenceDisabled()
412 mPolicyEditor, in testMobileData_entityHeaderSet()
DDataUsageListTest.java84 mNetworkServices.mPolicyEditor = mock(NetworkPolicyEditor.class); in setUp()