Home
last modified time | relevance | path

Searched refs:mSwitchPreference (Results 1 – 12 of 12) sorted by relevance

/packages/apps/Settings/src/com/android/settings/connecteddevice/usb/
DUsbDetailsPowerRoleController.java41 private SwitchPreference mSwitchPreference; field in UsbDetailsPowerRoleController
47 mSwitchPreference.setSummary(R.string.usb_switching_failed);
62 mSwitchPreference = new SwitchPreference(mPreferenceCategory.getContext()); in displayPreference()
63 mSwitchPreference.setTitle(R.string.usb_use_power_only); in displayPreference()
64 mSwitchPreference.setOnPreferenceClickListener(this); in displayPreference()
65 mPreferenceCategory.addPreference(mSwitchPreference); in displayPreference()
77 mSwitchPreference.setChecked(true); in refresh()
80 mSwitchPreference.setChecked(false); in refresh()
85 mSwitchPreference.setSummary(""); in refresh()
93 mSwitchPreference.setSummary(""); in refresh()
[all …]
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/connecteddevice/usb/
DUsbDetailsPowerRoleController.java41 private SwitchPreference mSwitchPreference; field in UsbDetailsPowerRoleController
47 mSwitchPreference.setSummary(R.string.usb_switching_failed);
62 mSwitchPreference = new SwitchPreference(mPreferenceCategory.getContext()); in displayPreference()
63 mSwitchPreference.setTitle(R.string.usb_use_power_only); in displayPreference()
64 mSwitchPreference.setOnPreferenceClickListener(this); in displayPreference()
65 mPreferenceCategory.addPreference(mSwitchPreference); in displayPreference()
77 mSwitchPreference.setChecked(true); in refresh()
80 mSwitchPreference.setChecked(false); in refresh()
85 mSwitchPreference.setSummary(""); in refresh()
93 mSwitchPreference.setSummary(""); in refresh()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/display/
DAmbientDisplayNotificationsPreferenceControllerTest.java58 private SwitchPreference mSwitchPreference; field in AmbientDisplayNotificationsPreferenceControllerTest
83 mController.updateState(mSwitchPreference); in updateState_enabled()
85 verify(mSwitchPreference).setChecked(true); in updateState_enabled()
92 mController.updateState(mSwitchPreference); in updateState_disabled()
94 verify(mSwitchPreference).setChecked(false); in updateState_disabled()
99 mController.onPreferenceChange(mSwitchPreference, true); in onPreferenceChange_enable()
107 mController.onPreferenceChange(mSwitchPreference, false); in onPreferenceChange_disable()
143 when(mSwitchPreference.getKey()).thenReturn( in handlePreferenceTreeClick_reportsEventForItsPreference()
146 mController.handlePreferenceTreeClick(mSwitchPreference); in handlePreferenceTreeClick_reportsEventForItsPreference()
153 when(mSwitchPreference.getKey()).thenReturn("some_other_key"); in handlePreferenceTreeClick_doesntReportEventForOtherPreferences()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/telephony/gsm/
DAutoSelectPreferenceControllerTest.java63 private SwitchPreference mSwitchPreference; field in AutoSelectPreferenceControllerTest
82 mSwitchPreference = new SwitchPreference(mContext); in setUp()
85 mController.mSwitchPreference = mSwitchPreference; in setUp()
105 mController.updateState(mSwitchPreference); in updateState_isRoaming_enabled()
107 assertThat(mSwitchPreference.isEnabled()).isTrue(); in updateState_isRoaming_enabled()
115 mController.updateState(mSwitchPreference); in updateState_notRoamingWithAutoSelectOn_disabled()
117 assertThat(mSwitchPreference.isEnabled()).isFalse(); in updateState_notRoamingWithAutoSelectOn_disabled()
118 assertThat(mSwitchPreference.getSummary()).isEqualTo( in updateState_notRoamingWithAutoSelectOn_disabled()
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/tether/
DWifiTetherAutoOffPreferenceControllerTest.java41 private SwitchPreference mSwitchPreference; field in WifiTetherAutoOffPreferenceControllerTest
49 mSwitchPreference = new SwitchPreference(mContext); in setup()
70 mController.updateState(mSwitchPreference); in testUpdateState_settingsOn_toggleOn()
72 assertThat(mSwitchPreference.isChecked()).isTrue(); in testUpdateState_settingsOn_toggleOn()
79 mController.updateState(mSwitchPreference); in testUpdateState_settingsOff_toggleOff()
81 assertThat(mSwitchPreference.isChecked()).isFalse(); in testUpdateState_settingsOff_toggleOff()
86 mController.updateState(mSwitchPreference); in testUpdateState_toggleDefaultOn()
88 assertThat(mSwitchPreference.isChecked()).isTrue(); in testUpdateState_toggleDefaultOn()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/accounts/
DAccountAutoSyncPreferenceControllerTest.java60 private SwitchPreference mSwitchPreference; field in AccountAutoSyncPreferenceControllerTest
75 mSwitchPreference = new SwitchPreference(application); in setUp()
77 AccountAutoSyncPreferenceController.class, mSwitchPreference); in setUp()
103 assertThat(mSwitchPreference.isChecked()).isTrue(); in refreshUi_masterSyncOn_preferenceShouldBeChecked()
113 assertThat(mSwitchPreference.isChecked()).isFalse(); in refreshUi_masterSyncOff_preferenceShouldNotBeChecked()
118 mSwitchPreference.performClick(); in onPreferenceClicked_shouldOpenDialog()
131 assertThat(mSwitchPreference.isChecked()).isFalse(); in onConfirm_shouldTogglePreference()
138 assertThat(mSwitchPreference.isChecked()).isTrue(); in onConfirm_shouldTogglePreference()
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/
DDataDuringCallsPreferenceControllerTest.java66 private SwitchPreference mSwitchPreference; field in DataDuringCallsPreferenceControllerTest
75 mSwitchPreference = new SwitchPreference(mContext); in setUp()
76 when(mPreferenceScreen.findPreference(PREF_KEY)).thenReturn(mSwitchPreference); in setUp()
99 assertThat(mSwitchPreference.isVisible()).isFalse(); in displayPreference_defaultForData_notAvailable()
109 assertThat(mSwitchPreference.isVisible()).isTrue(); in displayPreference_notDefaultForData_available()
121 assertThat(mSwitchPreference.isVisible()).isFalse(); in onSubscriptionsChanged_becomesDefaultForData_notAvailable()
133 assertThat(mSwitchPreference.isVisible()).isTrue(); in onSubscriptionsChanged_noLongerDefaultForData_available()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/network/telephony/gsm/
DAutoSelectPreferenceController.java62 SwitchPreference mSwitchPreference; field in AutoSelectPreferenceController
82 mSwitchPreference = screen.findPreference(getPreferenceKey()); in displayPreference()
113 mSwitchPreference.setEnabled(false); in setChecked()
122 mSwitchPreference.setEnabled(true); in setChecked()
123 mSwitchPreference.setChecked( in setChecked()
/packages/apps/Settings/src/com/android/settings/network/telephony/gsm/
DAutoSelectPreferenceController.java61 SwitchPreference mSwitchPreference; field in AutoSelectPreferenceController
81 mSwitchPreference = screen.findPreference(getPreferenceKey()); in displayPreference()
112 mSwitchPreference.setEnabled(false); in setChecked()
121 mSwitchPreference.setEnabled(true); in setChecked()
122 mSwitchPreference.setChecked( in setChecked()
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/managedomainurls/
DInstantAppWebActionPreferenceControllerTest.java50 private SwitchPreference mSwitchPreference; field in InstantAppWebActionPreferenceControllerTest
58 mSwitchPreference = new SwitchPreference(mContext); in setUp()
85 mController.onPreferenceChange(mSwitchPreference, true); in onPreferenceChange_enable()
93 mController.onPreferenceChange(mSwitchPreference, false); in onPreferenceChange_disable()
/packages/apps/Settings/src/com/android/settings/network/telephony/
DRoamingPreferenceController.java48 private RestrictedSwitchPreference mSwitchPreference; field in RoamingPreferenceController
75 updateState(mSwitchPreference); in onStart()
89 updateState(mSwitchPreference); in onStart()
103 mSwitchPreference = screen.findPreference(getPreferenceKey()); in displayPreference()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/network/telephony/
DRoamingPreferenceController.java50 private RestrictedSwitchPreference mSwitchPreference; field in RoamingPreferenceController
78 mSwitchPreference = screen.findPreference(getPreferenceKey()); in displayPreference()
164 updateState(mSwitchPreference); in onChange()