Home
last modified time | relevance | path

Searched refs:switchPreference (Results 1 – 25 of 27) sorted by relevance

12

/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/permissions/request/
DAdditionalPermissionsFragment.kt159 return HealthSwitchPreference(requireContext()).also { switchPreference -> in <lambda>() method
160 switchPreference.setDefaultValue(value) in <lambda>()
161 switchPreference.title = getString(additionalPermissionStrings.permissionTitle) in <lambda>()
162 switchPreference.summary = summary in <lambda>()
163 switchPreference.logNameActive = in <lambda>()
165 switchPreference.logNameInactive = in <lambda>()
168 switchPreference.setOnPreferenceChangeListener { _, newValue -> in <lambda>()
182 return HealthSwitchPreference(requireContext()).also { switchPreference -> in <lambda>() method
183 switchPreference.setDefaultValue(value) in <lambda>()
184 switchPreference.title = getString(additionalPermissionStrings.permissionTitle) in <lambda>()
[all …]
/packages/apps/Car/Settings/src/com/android/car/settings/inputmethod/
DKeyboardManagementPreferenceController.java192 CarUiSwitchPreference switchPreference = new CarUiSwitchPreference(getContext()); in createSwitchPreference() local
193 switchPreference.setKey(String.valueOf(inputMethodInfo.getId())); in createSwitchPreference()
194 switchPreference.setIcon(InputMethodUtil.getPackageIcon(mPackageManager, inputMethodInfo)); in createSwitchPreference()
195 switchPreference.setTitle(InputMethodUtil.getPackageLabel(mPackageManager, in createSwitchPreference()
197 switchPreference.setChecked(InputMethodUtil.isInputMethodEnabled(getContext() in createSwitchPreference()
199 switchPreference.setSummary(InputMethodUtil.getSummaryString(getContext(), in createSwitchPreference()
206 switchPreference.setEnabled(true); in createSwitchPreference()
208 switchPreference.setEnabled(!isOnlyEnabledDefaultInputMethod(inputMethodInfo)); in createSwitchPreference()
212 switchPreference.setEnabled(false); in createSwitchPreference()
213 setClickableWhileDisabled(switchPreference, /* clickable= */ true, p -> in createSwitchPreference()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/accessibility/
DToggleScreenMagnificationPreferenceFragmentTest.java202 final TwoStatePreference switchPreference = mFragController.get().findPreference( in onResume_defaultStateForFollowingTyping_switchPreferenceShouldReturnTrue() local
204 assertThat(switchPreference).isNotNull(); in onResume_defaultStateForFollowingTyping_switchPreferenceShouldReturnTrue()
205 assertThat(switchPreference.isChecked()).isTrue(); in onResume_defaultStateForFollowingTyping_switchPreferenceShouldReturnTrue()
214 final TwoStatePreference switchPreference = mFragController.get().findPreference( in onResume_disableFollowingTyping_switchPreferenceShouldReturnFalse() local
216 assertThat(switchPreference).isNotNull(); in onResume_disableFollowingTyping_switchPreferenceShouldReturnFalse()
217 assertThat(switchPreference.isChecked()).isFalse(); in onResume_disableFollowingTyping_switchPreferenceShouldReturnFalse()
225 final TwoStatePreference switchPreference = mFragController.get().findPreference( in onResume_defaultStateForOneFingerPan_switchPreferenceShouldReturnFalse() local
227 assertThat(switchPreference).isNotNull(); in onResume_defaultStateForOneFingerPan_switchPreferenceShouldReturnFalse()
228 assertThat(switchPreference.isChecked()).isFalse(); in onResume_defaultStateForOneFingerPan_switchPreferenceShouldReturnFalse()
238 final TwoStatePreference switchPreference = mFragController.get().findPreference( in onResume_enableOneFingerPan_switchPreferenceShouldReturnTrue() local
[all …]
DToggleColorInversionPreferenceFragmentTest.java221 final SettingsMainSwitchPreference switchPreference = in TestToggleColorInversionPreferenceFragment() local
223 switchPreference.setKey(KEY_USE_SERVICE_PREFERENCE); in TestToggleColorInversionPreferenceFragment()
224 mToggleServiceSwitchPreference = switchPreference; in TestToggleColorInversionPreferenceFragment()
DToggleDaltonizerPreferenceFragmentTest.java244 final SettingsMainSwitchPreference switchPreference = in TestToggleDaltonizerPreferenceFragment() local
246 switchPreference.setKey(KEY_USE_SERVICE_PREFERENCE); in TestToggleDaltonizerPreferenceFragment()
247 mToggleServiceSwitchPreference = switchPreference; in TestToggleDaltonizerPreferenceFragment()
/packages/apps/Car/Settings/src/com/android/car/settings/profiles/
DPermissionsPreferenceController.java110 for (SwitchPreference switchPreference : mPermissionPreferences) { in onCreateInternal()
111 getPreference().addPreference(switchPreference); in onCreateInternal()
117 for (SwitchPreference switchPreference : mPermissionPreferences) { in updateState()
119 switchPreference.setChecked( in updateState()
121 switchPreference.getExtras().getString(PERMISSION_TYPE_KEY), in updateState()
/packages/apps/Settings/src/com/android/settings/users/
DAutoSyncDataPreferenceController.java62 TwoStatePreference switchPreference = (TwoStatePreference) preference; in updateState() local
63 switchPreference.setChecked(ContentResolver.getMasterSyncAutomaticallyAsUser( in updateState()
70 TwoStatePreference switchPreference = (TwoStatePreference) preference; in handlePreferenceTreeClick() local
71 boolean checked = switchPreference.isChecked(); in handlePreferenceTreeClick()
72 switchPreference.setChecked(!checked); in handlePreferenceTreeClick()
/packages/apps/Settings/src/com/android/settings/bluetooth/
DBluetoothDetailsSpatialAudioController.java96 TwoStatePreference switchPreference = (TwoStatePreference) preference; in onPreferenceClick() local
97 String key = switchPreference.getKey(); in onPreferenceClick()
102 switchPreference.isChecked()); in onPreferenceClick()
103 updateSpatializerEnabled(switchPreference.isChecked()); in onPreferenceClick()
109 .execute(() -> refreshSpatialAudioEnabled(switchPreference)); in onPreferenceClick()
116 switchPreference.isChecked()); in onPreferenceClick()
117 updateSpatializerHeadTracking(switchPreference.isChecked()); in onPreferenceClick()
DBluetoothDetailsDataSyncController.java89 TwoStatePreference switchPreference = (TwoStatePreference) preference; in onPreferenceClick() local
90 String key = switchPreference.getKey(); in onPreferenceClick()
92 if (switchPreference.isChecked()) { in onPreferenceClick()
/packages/apps/Settings/src/com/android/settings/security/
DContentProtectionWorkSwitchController.java90 RestrictedSwitchPreference switchPreference = screen.findPreference(getPreferenceKey()); in displayPreference() local
91 if (switchPreference != null) { in displayPreference()
92 switchPreference.setDisabledByAdmin(getEnforcedAdmin(managedProfile)); in displayPreference()
/packages/apps/Settings/src/com/android/settings/development/
DHardwareOverlaysPreferenceController.java74 final TwoStatePreference switchPreference = (TwoStatePreference) mPreference; in onDeveloperOptionsSwitchDisabled() local
75 if (switchPreference.isChecked()) { in onDeveloperOptionsSwitchDisabled()
79 switchPreference.setChecked(false); in onDeveloperOptionsSwitchDisabled()
DWaitForDebuggerPreferenceController.java82 final TwoStatePreference switchPreference = (TwoStatePreference) preference; in updateState() local
86 switchPreference.setChecked(debuggerEnabled); in updateState()
87 switchPreference.setEnabled(!TextUtils.isEmpty(debugApp)); in updateState()
/packages/apps/Settings/src/com/android/settings/notification/
DBootSoundPreferenceController.java54 TwoStatePreference switchPreference = (TwoStatePreference) preference; in handlePreferenceTreeClick() local
55 SystemProperties.set(PROPERTY_BOOT_SOUNDS, switchPreference.isChecked() ? "1" : "0"); in handlePreferenceTreeClick()
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/permissions/app/
DSettingsManageAppPermissionsFragment.kt144 permissionMap.forEach { (healthPermission, switchPreference) -> in <lambda>() method
145 switchPreference.isChecked = healthPermission in granted in <lambda>()
293 val switchPreference = in <lambda>() constant
316 permissionMap[permission] = switchPreference in <lambda>()
317 category.addPreference(switchPreference) in <lambda>()
DConnectedAppFragment.kt153 permissionMap.forEach { (healthPermission, switchPreference) -> in <lambda>() method
154 switchPreference.isChecked = healthPermission in granted in <lambda>()
/packages/apps/Settings/src/com/android/settings/network/telephony/
DVideoCallingPreferenceController.java99 final TwoStatePreference switchPreference = (TwoStatePreference) preference; in updateState() local
101 switchPreference.setVisible(videoCallEnabled); in updateState()
109 switchPreference.setChecked(videoCallEditable && isChecked()); in updateState()
DEnhanced4gBasePreferenceController.java156 final TwoStatePreference switchPreference = (TwoStatePreference) preference; in updateState() local
159 switchPreference.setEnabled(isUserControlAllowed(getCarrierConfigForSubId(mSubId)) in updateState()
161 switchPreference.setChecked(queryState.isEnabledByUser() in updateState()
/packages/apps/Settings/src/com/android/settings/nfc/
DSecureNfcPreferenceController.java52 final TwoStatePreference switchPreference = screen.findPreference(getPreferenceKey()); in displayPreference() local
54 mSecureNfcEnabler = new SecureNfcEnabler(mContext, switchPreference); in displayPreference()
/packages/apps/Settings/src/com/android/settings/accessibility/
DFloatingMenuFadePreferenceController.java84 final TwoStatePreference switchPreference = (TwoStatePreference) preference; in updateState() local
86 switchPreference.setChecked(getFloatingMenuFadeValue() == ON); in updateState()
DToggleReduceBrightColorsPreferenceFragment.java161 protected void updateToggleServiceTitle(SettingsMainSwitchPreference switchPreference) { in updateToggleServiceTitle() argument
162 switchPreference.setTitle(R.string.reduce_bright_colors_preference_title); in updateToggleServiceTitle()
DToggleColorInversionPreferenceFragment.java130 protected void updateToggleServiceTitle(SettingsMainSwitchPreference switchPreference) { in updateToggleServiceTitle() argument
131 switchPreference.setTitle(R.string.accessibility_display_inversion_switch_title); in updateToggleServiceTitle()
DToggleDaltonizerPreferenceFragment.java216 protected void updateToggleServiceTitle(SettingsMainSwitchPreference switchPreference) { in updateToggleServiceTitle() argument
217 switchPreference.setTitle(R.string.accessibility_daltonizer_primary_switch_title); in updateToggleServiceTitle()
/packages/apps/Settings/tests/robotests/src/com/android/settings/development/compat/
DPlatformCompatDashboardTest.java194 SwitchPreferenceCompat switchPreference = (SwitchPreferenceCompat) preference; in createPreferenceForChange_cannotOverride_createDisabledEntry() local
198 assertThat(switchPreference.isChecked()).isTrue(); in createPreferenceForChange_cannotOverride_createDisabledEntry()
199 assertThat(switchPreference.isEnabled()).isFalse(); in createPreferenceForChange_cannotOverride_createDisabledEntry()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/safetycenter/ui/
DPrivacySubpageFragment.kt155 val switchPreference: ClickableDisabledSwitchPreference? = findPreference(prefType.key) in <lambda>() constant
156 switchPreference?.setupState( in <lambda>()
/packages/apps/Settings/tests/robotests/src/com/android/settings/security/
DContentProtectionTogglePreferenceControllerTest.java81 SettingsMainSwitchPreference switchPreference = new SettingsMainSwitchPreference(mContext); in setUp() local
83 .thenReturn(switchPreference); in setUp()

12