Home
last modified time | relevance | path

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

/packages/apps/Settings/tests/robotests/src/com/android/settings/network/
DTetherEnablerTest.java86 private TetherEnabler mEnabler; field in TetherEnablerTest
108 mEnabler = spy(new TetherEnabler(context, mSwitchWidgetController, panReference)); in setUp()
109 ReflectionHelpers.setField(mEnabler, "mBluetoothAdapter", mBluetoothAdapter); in setUp()
117 mEnabler.onStart(); in lifecycle_onStart_setCheckedCorrectly()
123 mEnabler.onStart(); in lifecycle_onStart_shoudRegisterTetheringEventCallback()
125 eq(mEnabler.mTetheringEventCallback)); in lifecycle_onStart_shoudRegisterTetheringEventCallback()
130 mEnabler.onStart(); in lifecycle_onStop_shouldUnregisterTetheringEventCallback()
131 TetheringManager.TetheringEventCallback callback = mEnabler.mTetheringEventCallback; in lifecycle_onStop_shouldUnregisterTetheringEventCallback()
133 mEnabler.onStop(); in lifecycle_onStop_shouldUnregisterTetheringEventCallback()
135 assertThat(mEnabler.mTetheringEventCallback).isNull(); in lifecycle_onStop_shouldUnregisterTetheringEventCallback()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/location/
DLocationEnablerTest.java72 private LocationEnabler mEnabler; field in LocationEnablerTest
83 mEnabler = spy(new LocationEnabler(mContext, mListener, mLifecycle)); in setUp()
88 mEnabler.onStart(); in onStart_shouldSetActiveAndRegisterListener()
90 verify(mContext).registerReceiver(eq(mEnabler.mReceiver), in onStart_shouldSetActiveAndRegisterListener()
96 mEnabler.onStart(); in onStart_shouldRefreshLocationMode()
98 verify(mEnabler).refreshLocationMode(); in onStart_shouldRefreshLocationMode()
103 mEnabler.onStart(); in onStop_shouldUnregisterListener()
104 mEnabler.onStop(); in onStop_shouldUnregisterListener()
106 verify(mContext).unregisterReceiver(mEnabler.mReceiver); in onStop_shouldUnregisterListener()
111 mEnabler.onStart(); in onReceive_shouldRefreshLocationMode()
[all …]
DLocationSwitchBarControllerTest.java52 private LocationEnabler mEnabler; field in LocationSwitchBarControllerTest
67 ReflectionHelpers.setField(mController, "mLocationEnabler", mEnabler); in setUp()
89 verify(mEnabler).setLocationEnabled(true); in onSwitchChanged_switchChecked_shouldSetLocationEnabled()
96 verify(mEnabler).setLocationEnabled(false); in onSwitchChanged_switchUnchecked_shouldSetLocationDisabled()
103 doReturn(admin).when(mEnabler).getShareLocationEnforcedAdmin(anyInt()); in onLocationModeChanged_hasEnforcedAdmin_shouldDisableSwitchByAdmin()
104 doReturn(false).when(mEnabler).hasShareLocationRestriction(anyInt()); in onLocationModeChanged_hasEnforcedAdmin_shouldDisableSwitchByAdmin()
113 doReturn(null).when(mEnabler).getShareLocationEnforcedAdmin(anyInt()); in onLocationModeChanged_Restricted_shouldDisableSwitch()
114 doReturn(true).when(mEnabler).hasShareLocationRestriction(anyInt()); in onLocationModeChanged_Restricted_shouldDisableSwitch()
123 doReturn(null).when(mEnabler).getShareLocationEnforcedAdmin(anyInt()); in onLocationModeChanged_notRestricted_shouldEnableSwitch()
124 doReturn(false).when(mEnabler).hasShareLocationRestriction(anyInt()); in onLocationModeChanged_notRestricted_shouldEnableSwitch()
[all …]
DLocationForWorkPreferenceControllerTest.java62 private LocationEnabler mEnabler; field in LocationForWorkPreferenceControllerTest
84 ReflectionHelpers.setField(mController, "mLocationEnabler", mEnabler); in setUp()
119 doReturn(admin).when(mEnabler).getShareLocationEnforcedAdmin(anyInt()); in onLocationModeChanged_disabledByAdmin_shouldDisablePreference()
120 doReturn(false).when(mEnabler).isManagedProfileRestrictedByBase(); in onLocationModeChanged_disabledByAdmin_shouldDisablePreference()
130 doReturn(null).when(mEnabler).getShareLocationEnforcedAdmin(anyInt()); in onLocationModeChanged_locationOff_shouldDisablePreference()
131 doReturn(false).when(mEnabler).isManagedProfileRestrictedByBase(); in onLocationModeChanged_locationOff_shouldDisablePreference()
143 doReturn(null).when(mEnabler).getShareLocationEnforcedAdmin(anyInt()); in onLocationModeChanged_locationOn_shouldEnablePreference()
144 doReturn(false).when(mEnabler).isManagedProfileRestrictedByBase(); in onLocationModeChanged_locationOn_shouldEnablePreference()
145 doReturn(true).when(mEnabler).isEnabled(anyInt()); in onLocationModeChanged_locationOn_shouldEnablePreference()
156 doReturn(null).when(mEnabler).getShareLocationEnforcedAdmin(anyInt()); in onLocationModeChanged_noRestriction_shouldCheckedPreference()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/specialaccess/
DPaymentSettingsEnablerTest.java43 private PaymentSettingsEnabler mEnabler; field in PaymentSettingsEnablerTest
50 mEnabler = spy(new PaymentSettingsEnabler(mContext, mPreference)); in setUp()
55 mEnabler.handleNfcStateChanged(NfcAdapter.STATE_OFF); in handleNfcStateChanged_stateOff_shouldChangeSummaryAndDisablePreference()
64 mEnabler.handleNfcStateChanged(NfcAdapter.STATE_ON); in handleNfcStateChanged_stateOn_shouldClearSummaryAndEnablePreference()
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/
DWifiEnablerTest.java51 private WifiEnabler mEnabler; field in WifiEnablerTest
57 mEnabler = new WifiEnabler(mContext, mock(SwitchWidgetController.class), in setUp()
66 assertThat(mEnabler.onSwitchToggled(true)).isTrue(); in onSwitchToggled_avoidBadWifiConfigIsFalse_shouldReturnTrue()