Searched refs:mEnabler (Results 1 – 7 of 7) sorted by relevance
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/ |
D | TetherEnablerTest.java | 84 private TetherEnabler mEnabler; field in TetherEnablerTest 105 mEnabler = spy(new TetherEnabler(context, mSwitchWidgetController, panReference)); in setUp() 106 ReflectionHelpers.setField(mEnabler, "mBluetoothAdapter", mBluetoothAdapter); in setUp() 114 mEnabler.onStart(); in lifecycle_onStart_setCheckedCorrectly() 121 mEnabler.onStart(); in lifecycle_onStart_shoudRegisterTetheringEventCallback() 123 eq(mEnabler.mTetheringEventCallback)); in lifecycle_onStart_shoudRegisterTetheringEventCallback() 128 mEnabler.onStart(); in lifecycle_onStop_shouldUnregisterTetheringEventCallback() 129 TetheringManager.TetheringEventCallback callback = mEnabler.mTetheringEventCallback; in lifecycle_onStop_shouldUnregisterTetheringEventCallback() 131 mEnabler.onStop(); in lifecycle_onStop_shouldUnregisterTetheringEventCallback() 133 assertThat(mEnabler.mTetheringEventCallback).isNull(); in lifecycle_onStop_shouldUnregisterTetheringEventCallback() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/location/ |
D | LocationEnablerTest.java | 67 private LocationEnabler mEnabler; field in LocationEnablerTest 78 mEnabler = spy(new LocationEnabler(mContext, mListener, mLifecycle)); in setUp() 83 mEnabler.onStart(); in onStart_shouldSetActiveAndRegisterListener() 85 verify(mContext).registerReceiver(eq(mEnabler.mReceiver), in onStart_shouldSetActiveAndRegisterListener() 91 mEnabler.onStart(); in onStart_shouldRefreshLocationMode() 93 verify(mEnabler).refreshLocationMode(); in onStart_shouldRefreshLocationMode() 98 mEnabler.onStart(); in onStop_shouldUnregisterListener() 99 mEnabler.onStop(); in onStop_shouldUnregisterListener() 101 verify(mContext).unregisterReceiver(mEnabler.mReceiver); in onStop_shouldUnregisterListener() 106 mEnabler.onStart(); in onReceive_shouldRefreshLocationMode() [all …]
|
D | LocationSwitchBarControllerTest.java | 53 private LocationEnabler mEnabler; field in LocationSwitchBarControllerTest 68 ReflectionHelpers.setField(mController, "mLocationEnabler", mEnabler); in setUp() 90 verify(mEnabler).setLocationEnabled(true); in onSwitchChanged_switchChecked_shouldSetLocationEnabled() 97 verify(mEnabler).setLocationEnabled(false); in onSwitchChanged_switchUnchecked_shouldSetLocationDisabled() 104 doReturn(admin).when(mEnabler).getShareLocationEnforcedAdmin(anyInt()); in onLocationModeChanged_hasEnforcedAdmin_shouldDisableSwitchByAdmin() 105 doReturn(false).when(mEnabler).hasShareLocationRestriction(anyInt()); in onLocationModeChanged_hasEnforcedAdmin_shouldDisableSwitchByAdmin() 116 doReturn(null).when(mEnabler).getShareLocationEnforcedAdmin(anyInt()); in onLocationModeChanged_Restricted_shouldDisableSwitchByAdmin() 117 doReturn(false).when(mEnabler).hasShareLocationRestriction(anyInt()); in onLocationModeChanged_Restricted_shouldDisableSwitchByAdmin() 126 doReturn(null).when(mEnabler).getShareLocationEnforcedAdmin(anyInt()); in onLocationModeChanged_Restricted_shouldDisableSwitch() 127 doReturn(true).when(mEnabler).hasShareLocationRestriction(anyInt()); in onLocationModeChanged_Restricted_shouldDisableSwitch() [all …]
|
D | LocationForWorkPreferenceControllerTest.java | 62 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 …]
|
D | LocationForPrivateProfilePreferenceControllerTest.java | 63 private LocationEnabler mEnabler; field in LocationForPrivateProfilePreferenceControllerTest 85 ReflectionHelpers.setField(mController, "mLocationEnabler", mEnabler); in setUp() 120 doReturn(admin).when(mEnabler).getShareLocationEnforcedAdmin(anyInt()); in onLocationModeChanged_disabledByAdmin_shouldDisablePreference() 121 doReturn(false).when(mEnabler).hasShareLocationRestriction(anyInt()); in onLocationModeChanged_disabledByAdmin_shouldDisablePreference() 131 doReturn(null).when(mEnabler).getShareLocationEnforcedAdmin(anyInt()); in onLocationModeChanged_locationOff_shouldDisablePreference() 132 doReturn(false).when(mEnabler).hasShareLocationRestriction(anyInt()); in onLocationModeChanged_locationOff_shouldDisablePreference() 144 doReturn(null).when(mEnabler).getShareLocationEnforcedAdmin(anyInt()); in onLocationModeChanged_locationOn_shouldEnablePreference() 145 doReturn(false).when(mEnabler).hasShareLocationRestriction(anyInt()); in onLocationModeChanged_locationOn_shouldEnablePreference() 146 doReturn(true).when(mEnabler).isEnabled(anyInt()); in onLocationModeChanged_locationOn_shouldEnablePreference() 157 doReturn(null).when(mEnabler).getShareLocationEnforcedAdmin(anyInt()); in onLocationModeChanged_noRestriction_shouldCheckedPreference() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/ |
D | WifiEnablerTest.java | 54 private WifiEnabler mEnabler; field in WifiEnablerTest 60 mEnabler = new WifiEnabler(mContext, mock(SwitchWidgetController.class), in setUp() 69 assertThat(mEnabler.onSwitchToggled(true)).isTrue(); in onSwitchToggled_avoidBadWifiConfigIsFalse_shouldReturnTrue() 74 mEnabler.mIsSatelliteOn.set(true); in onSwitchToggled_satelliteOn_startWarningActivity() 77 mEnabler.onSwitchToggled(true); in onSwitchToggled_satelliteOn_startWarningActivity()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/specialaccess/ |
D | PaymentSettingsEnablerTest.java | 43 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()
|