/packages/apps/Launcher3/src/com/android/launcher3/config/ |
D | FlagTogglerPrefUi.java | 88 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/ |
D | OverlayActivity.java | 67 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/ |
D | KeyboardManagementPreferenceController.java | 184 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/ |
D | AutoSyncDataPreferenceController.java | 61 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/ |
D | AutoSyncDataPreferenceController.java | 61 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/ |
D | PermissionsPreferenceController.java | 109 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/ |
D | Enhanced4gLtePreferenceController.java | 106 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()
|
D | RoamingPreferenceController.java | 116 final RestrictedSwitchPreference switchPreference = (RestrictedSwitchPreference) preference; in updateState() local 117 switchPreference.setEnabled(mSubId != SubscriptionManager.INVALID_SUBSCRIPTION_ID); in updateState() 118 switchPreference.setChecked(isChecked()); in updateState()
|
D | VideoCallingPreferenceController.java | 94 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/ |
D | Enhanced4gLtePreferenceController.java | 106 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()
|
D | RoamingPreferenceController.java | 139 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()
|
D | VideoCallingPreferenceController.java | 92 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/ |
D | WaitForDebuggerPreferenceController.java | 82 final SwitchPreference switchPreference = (SwitchPreference) preference; in updateState() local 86 switchPreference.setChecked(debuggerEnabled); in updateState() 87 switchPreference.setEnabled(!TextUtils.isEmpty(debugApp)); in updateState()
|
D | HardwareOverlaysPreferenceController.java | 74 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/ |
D | WaitForDebuggerPreferenceController.java | 82 final SwitchPreference switchPreference = (SwitchPreference) preference; in updateState() local 86 switchPreference.setChecked(debuggerEnabled); in updateState() 87 switchPreference.setEnabled(!TextUtils.isEmpty(debugApp)); in updateState()
|
D | HardwareOverlaysPreferenceController.java | 74 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/ |
D | GameDriverEnableForAllAppsPreferenceController.java | 92 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/ |
D | NfcPreferenceController.java | 60 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()
|
D | SecureNfcPreferenceController.java | 48 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/ |
D | BootSoundPreferenceController.java | 54 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/ |
D | BootSoundPreferenceController.java | 54 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/ |
D | SecureNfcPreferenceController.java | 48 final SwitchPreference switchPreference = screen.findPreference(getPreferenceKey()); in displayPreference() local 50 mSecureNfcEnabler = new SecureNfcEnabler(mContext, switchPreference); in displayPreference()
|
D | NfcPreferenceController.java | 58 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/ |
D | PlatformCompatDashboardTest.java | 185 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/ |
D | ReviewPermissionsWearFragment.java | 215 SwitchPreference switchPreference = (SwitchPreference) preference; in onPreferenceChange() local 216 if (switchPreference.isChecked()) { in onPreferenceChange() 217 showWarnRevokeDialog(switchPreference); in onPreferenceChange()
|