Home
last modified time | relevance | path

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

/packages/apps/Launcher3/src/com/android/launcher3/config/
DFlagTogglerPrefUi.java87 SwitchPreference switchPreference = new SwitchPreference(mContext); in applyTo() local
88 switchPreference.setKey(flag.getKey()); in applyTo()
89 switchPreference.setDefaultValue(flag.getDefaultValue()); in applyTo()
90 switchPreference.setChecked(getFlagStateFromSharedPrefs(flag)); in applyTo()
91 switchPreference.setTitle(flag.getKey()); in applyTo()
92 updateSummary(switchPreference, flag); in applyTo()
93 switchPreference.setPreferenceDataStore(mDataStore); in applyTo()
94 parent.addPreference(switchPreference); in applyTo()
102 private void updateSummary(SwitchPreference switchPreference, TogglableFlag flag) { in updateSummary() argument
105 switchPreference.setSummaryOn(Html.fromHtml(onWarning + flag.getDescription())); in updateSummary()
[all …]
/packages/apps/Car/Settings/src/com/android/car/settings/inputmethod/
DKeyboardManagementPreferenceController.java180 SwitchPreference switchPreference = new SwitchPreference(getContext()); in createSwitchPreference() local
181 switchPreference.setKey(String.valueOf(inputMethodInfo.getId())); in createSwitchPreference()
182 switchPreference.setIcon(InputMethodUtil.getPackageIcon(mPackageManager, inputMethodInfo)); in createSwitchPreference()
183 switchPreference.setTitle(InputMethodUtil.getPackageLabel(mPackageManager, in createSwitchPreference()
185 switchPreference.setChecked(InputMethodUtil.isInputMethodEnabled(getContext() in createSwitchPreference()
187 switchPreference.setSummary(InputMethodUtil.getSummaryString(getContext(), in createSwitchPreference()
190 switchPreference.setOnPreferenceChangeListener((switchPref, newValue) -> { in createSwitchPreference()
201 return switchPreference; in createSwitchPreference()
/packages/apps/Settings/src/com/android/settings/users/
DAutoSyncDataPreferenceController.java61 SwitchPreference switchPreference = (SwitchPreference) preference; in updateState() local
62 switchPreference.setChecked(ContentResolver.getMasterSyncAutomaticallyAsUser( in updateState()
69 SwitchPreference switchPreference = (SwitchPreference) preference; in handlePreferenceTreeClick() local
70 boolean checked = switchPreference.isChecked(); in handlePreferenceTreeClick()
71 switchPreference.setChecked(!checked); in handlePreferenceTreeClick()
76 switchPreference); in handlePreferenceTreeClick()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/users/
DAutoSyncDataPreferenceController.java61 SwitchPreference switchPreference = (SwitchPreference) preference; in updateState() local
62 switchPreference.setChecked(ContentResolver.getMasterSyncAutomaticallyAsUser( in updateState()
69 SwitchPreference switchPreference = (SwitchPreference) preference; in handlePreferenceTreeClick() local
70 boolean checked = switchPreference.isChecked(); in handlePreferenceTreeClick()
71 switchPreference.setChecked(!checked); in handlePreferenceTreeClick()
76 switchPreference); in handlePreferenceTreeClick()
/packages/apps/Car/Settings/src/com/android/car/settings/users/
DPermissionsPreferenceController.java109 for (SwitchPreference switchPreference : mPermissionPreferences) { in onCreateInternal()
110 getPreference().addPreference(switchPreference); in onCreateInternal()
116 for (SwitchPreference switchPreference : mPermissionPreferences) { in updateState()
117 switchPreference.setChecked(!getCarUserManagerHelper().hasUserRestriction( in updateState()
118 switchPreference.getExtras().getString(PERMISSION_TYPE_KEY), getUserInfo())); in updateState()
/packages/apps/Settings/src/com/android/settings/network/telephony/
DEnhanced4gLtePreferenceController.java106 final SwitchPreference switchPreference = (SwitchPreference) preference; in updateState() local
116 switchPreference.setTitle(mVariantTitles[variant4glteTitleIndex]); in updateState()
117 switchPreference.setSummary(mVariantSumaries[variant4glteTitleIndex]); in updateState()
118 switchPreference.setEnabled(is4gLtePrefEnabled()); in updateState()
119 switchPreference.setChecked(mImsManager.isEnhanced4gLteModeSettingEnabledByUser() in updateState()
DRoamingPreferenceController.java115 final RestrictedSwitchPreference switchPreference = (RestrictedSwitchPreference) preference; in updateState() local
116 if (!switchPreference.isDisabledByAdmin()) { in updateState()
117 switchPreference.setEnabled(mSubId != SubscriptionManager.INVALID_SUBSCRIPTION_ID); in updateState()
118 switchPreference.setChecked(isChecked()); in updateState()
DVideoCallingPreferenceController.java93 final SwitchPreference switchPreference = (SwitchPreference) preference; in updateState() local
95 switchPreference.setVisible(videoCallEnabled); in updateState()
101 switchPreference.setChecked(is4gLteEnabled && mImsManager.isVtEnabledByUser()); in updateState()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/network/telephony/
DEnhanced4gLtePreferenceController.java106 final SwitchPreference switchPreference = (SwitchPreference) preference; in updateState() local
116 switchPreference.setTitle(mVariantTitles[variant4glteTitleIndex]); in updateState()
117 switchPreference.setSummary(mVariantSumaries[variant4glteTitleIndex]); in updateState()
118 switchPreference.setEnabled(is4gLtePrefEnabled()); in updateState()
119 switchPreference.setChecked(mImsManager.isEnhanced4gLteModeSettingEnabledByUser() in updateState()
DRoamingPreferenceController.java116 final RestrictedSwitchPreference switchPreference = (RestrictedSwitchPreference) preference; in updateState() local
117 switchPreference.setEnabled(mSubId != SubscriptionManager.INVALID_SUBSCRIPTION_ID); in updateState()
118 switchPreference.setChecked(isChecked()); in updateState()
DVideoCallingPreferenceController.java94 final SwitchPreference switchPreference = (SwitchPreference) preference; in updateState() local
96 switchPreference.setVisible(videoCallEnabled); in updateState()
102 switchPreference.setChecked(is4gLteEnabled && mImsManager.isVtEnabledByUser()); in updateState()
/packages/apps/Settings/src/com/android/settings/development/
DWaitForDebuggerPreferenceController.java82 final SwitchPreference switchPreference = (SwitchPreference) preference; in updateState() local
86 switchPreference.setChecked(debuggerEnabled); in updateState()
87 switchPreference.setEnabled(!TextUtils.isEmpty(debugApp)); in updateState()
DHardwareOverlaysPreferenceController.java74 final SwitchPreference switchPreference = (SwitchPreference) mPreference; in onDeveloperOptionsSwitchDisabled() local
75 if (switchPreference.isChecked()) { in onDeveloperOptionsSwitchDisabled()
79 switchPreference.setChecked(false); in onDeveloperOptionsSwitchDisabled()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/development/
DHardwareOverlaysPreferenceController.java74 final SwitchPreference switchPreference = (SwitchPreference) mPreference; in onDeveloperOptionsSwitchDisabled() local
75 if (switchPreference.isChecked()) { in onDeveloperOptionsSwitchDisabled()
79 switchPreference.setChecked(false); in onDeveloperOptionsSwitchDisabled()
DWaitForDebuggerPreferenceController.java82 final SwitchPreference switchPreference = (SwitchPreference) preference; in updateState() local
86 switchPreference.setChecked(debuggerEnabled); in updateState()
87 switchPreference.setEnabled(!TextUtils.isEmpty(debugApp)); in updateState()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/development/gamedriver/
DGameDriverEnableForAllAppsPreferenceController.java92 final SwitchPreference switchPreference = (SwitchPreference) preference; in updateState() local
93 switchPreference.setVisible(isAvailable()); in updateState()
94 switchPreference.setChecked( in updateState()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/nfc/
DNfcPreferenceController.java60 final SwitchPreference switchPreference = screen.findPreference(getPreferenceKey()); in displayPreference() local
62 mNfcEnabler = new NfcEnabler(mContext, switchPreference); in displayPreference()
67 new NfcAirplaneModeObserver(mContext, mNfcAdapter, switchPreference); in displayPreference()
DSecureNfcPreferenceController.java48 final SwitchPreference switchPreference = screen.findPreference(getPreferenceKey()); in displayPreference() local
50 mSecureNfcEnabler = new SecureNfcEnabler(mContext, switchPreference); in displayPreference()
/packages/apps/Settings/src/com/android/settings/notification/
DBootSoundPreferenceController.java54 SwitchPreference switchPreference = (SwitchPreference) preference; in handlePreferenceTreeClick() local
55 SystemProperties.set(PROPERTY_BOOT_SOUNDS, switchPreference.isChecked() ? "1" : "0"); in handlePreferenceTreeClick()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/notification/
DBootSoundPreferenceController.java54 SwitchPreference switchPreference = (SwitchPreference) preference; in handlePreferenceTreeClick() local
55 SystemProperties.set(PROPERTY_BOOT_SOUNDS, switchPreference.isChecked() ? "1" : "0"); in handlePreferenceTreeClick()
/packages/apps/Settings/src/com/android/settings/nfc/
DSecureNfcPreferenceController.java48 final SwitchPreference switchPreference = screen.findPreference(getPreferenceKey()); in displayPreference() local
50 mSecureNfcEnabler = new SecureNfcEnabler(mContext, switchPreference); in displayPreference()
DNfcPreferenceController.java58 final SwitchPreference switchPreference = screen.findPreference(getPreferenceKey()); in displayPreference() local
60 mNfcEnabler = new NfcEnabler(mContext, switchPreference); in displayPreference()
/packages/apps/PermissionController/src/com/android/packageinstaller/permission/ui/wear/
DReviewPermissionsWearFragment.java215 SwitchPreference switchPreference = (SwitchPreference) preference; in onPreferenceChange() local
216 if (switchPreference.isChecked()) { in onPreferenceChange()
217 showWarnRevokeDialog(switchPreference); in onPreferenceChange()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/system/development/
DDevelopmentFragment.java580 void updateSwitchPreference(SwitchPreference switchPreference, boolean value) { in updateSwitchPreference() argument
581 switchPreference.setChecked(value); in updateSwitchPreference()