Home
last modified time | relevance | path

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

12

/packages/apps/Launcher3/src/com/android/launcher3/config/
DFlagTogglerPrefUi.java88 SwitchPreference switchPreference = new SwitchPreference(mContext); in applyTo() local
89 switchPreference.setKey(flag.getKey()); in applyTo()
90 switchPreference.setDefaultValue(flag.getDefaultValue()); in applyTo()
91 switchPreference.setChecked(getFlagStateFromSharedPrefs(flag)); in applyTo()
92 switchPreference.setTitle(flag.getKey()); in applyTo()
93 updateSummary(switchPreference, flag); in applyTo()
94 switchPreference.setPreferenceDataStore(mDataStore); in applyTo()
95 parent.addPreference(switchPreference); in applyTo()
103 private void updateSummary(SwitchPreference switchPreference, BaseTogglableFlag flag) { in updateSummary() argument
106 switchPreference.setSummaryOn(Html.fromHtml(onWarning + flag.getDescription())); in updateSummary()
[all …]
/packages/apps/Car/libs/car-ui-lib/tests/paintbooth/src/com/android/car/ui/paintbooth/overlays/
DOverlayActivity.java67 SwitchPreference switchPreference = new SwitchPreference(getContext()); in onCreatePreferences() local
68 switchPreference.setKey(overlayPackage.getPackageName()); in onCreatePreferences()
69 switchPreference.setTitle(overlayPackage.getPackageName()); in onCreatePreferences()
70 switchPreference.setSummary(targetPackage); in onCreatePreferences()
71 switchPreference.setChecked(overlayPackage.isEnabled()); in onCreatePreferences()
73 switchPreference.setOnPreferenceChangeListener((preference, newValue) -> { in onCreatePreferences()
78 getPreferenceScreen().addPreference(switchPreference); in onCreatePreferences()
/packages/apps/Car/Settings/src/com/android/car/settings/inputmethod/
DKeyboardManagementPreferenceController.java184 SwitchPreference switchPreference = new SwitchPreference(getContext()); in createSwitchPreference() local
185 switchPreference.setKey(String.valueOf(inputMethodInfo.getId())); in createSwitchPreference()
186 switchPreference.setIcon(InputMethodUtil.getPackageIcon(mPackageManager, inputMethodInfo)); in createSwitchPreference()
187 switchPreference.setTitle(InputMethodUtil.getPackageLabel(mPackageManager, in createSwitchPreference()
189 switchPreference.setChecked(InputMethodUtil.isInputMethodEnabled(getContext() in createSwitchPreference()
191 switchPreference.setSummary(InputMethodUtil.getSummaryString(getContext(), in createSwitchPreference()
194 switchPreference.setOnPreferenceChangeListener((switchPref, newValue) -> { in createSwitchPreference()
205 return switchPreference; in createSwitchPreference()
/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/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/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/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/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.java139 final RestrictedSwitchPreference switchPreference = (RestrictedSwitchPreference) preference; in updateState() local
140 if (!switchPreference.isDisabledByAdmin()) { in updateState()
141 switchPreference.setEnabled(mSubId != SubscriptionManager.INVALID_SUBSCRIPTION_ID); in updateState()
142 switchPreference.setChecked(isChecked()); in updateState()
DVideoCallingPreferenceController.java92 final SwitchPreference switchPreference = (SwitchPreference) preference; in updateState() local
94 switchPreference.setVisible(videoCallEnabled); in updateState()
100 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/
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/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/Settings/tests/robotests/src/com/android/settings/development/compat/
DPlatformCompatDashboardTest.java185 SwitchPreference switchPreference = (SwitchPreference) preference; in createPreferenceForChange_cannotOverride_createDisabledEntry() local
189 assertThat(switchPreference.isChecked()).isTrue(); in createPreferenceForChange_cannotOverride_createDisabledEntry()
190 assertThat(switchPreference.isEnabled()).isFalse(); in createPreferenceForChange_cannotOverride_createDisabledEntry()
/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()

12