/packages/services/Telephony/sip/src/com/android/services/telephony/sip/ |
D | SipEditor.java | 329 EditTextPreference pref = (EditTextPreference) key.preference; in isEditTextEmpty() local 330 return TextUtils.isEmpty(pref.getText()) in isEditTextEmpty() 331 || pref.getSummary().equals(getString(key.defaultSummary)); in isEditTextEmpty() 340 EditTextPreference pref = (EditTextPreference) p; in validateAndSetResult() local 348 pref.setText(getDefaultDisplayName()); in validateAndSetResult() 355 pref.setText(getString(R.string.default_port)); in validateAndSetResult() 359 firstEmptyFieldTitle = pref.getTitle(); in validateAndSetResult() 445 public boolean onPreferenceChange(Preference pref, Object newValue) { in onPreferenceChange() argument 450 if (pref instanceof CheckBoxPreference) { in onPreferenceChange() 456 pref.setSummary(getPreferenceKey(pref).defaultSummary); in onPreferenceChange() [all …]
|
/packages/apps/PackageInstaller/src/com/android/packageinstaller/permission/ui/wear/ |
D | AppPermissionsFragmentWear.java | 180 final SwitchPreference pref = createSwitchPreferenceForPermission(group, perm); in initializePermissionGroupList() local 181 showOrAddToNonSystemPreferences(pref, nonSystemPreferences, isPlatform); in initializePermissionGroupList() 184 final SwitchPreference pref = createSwitchPreferenceForGroup(group); in initializePermissionGroupList() local 185 showOrAddToNonSystemPreferences(pref, nonSystemPreferences, isPlatform); in initializePermissionGroupList() 195 private void showOrAddToNonSystemPreferences(SwitchPreference pref, in showOrAddToNonSystemPreferences() argument 200 getPreferenceScreen().addPreference(pref); in showOrAddToNonSystemPreferences() 202 nonSystemPreferences.add(pref); in showOrAddToNonSystemPreferences() 208 final SwitchPreference pref = new PermissionSwitchPreference(getActivity()); in createSwitchPreferenceForPermission() local 209 pref.setKey(perm.name); in createSwitchPreferenceForPermission() 210 pref.setTitle(perm.loadLabel(mPackageManager)); in createSwitchPreferenceForPermission() [all …]
|
/packages/apps/PackageInstaller/src/com/android/packageinstaller/permission/ui/television/ |
D | AllAppPermissionsFragment.java | 173 PreferenceGroup pref = findOrCreate(group != null ? group : perm, pm, prefs); in updateUi() local 174 pref.addPreference(getPreference(perm, group)); in updateUi() 218 PreferenceGroup pref = (PreferenceGroup) findPreference(group.name); in findOrCreate() local 219 if (pref == null) { in findOrCreate() 220 pref = new PreferenceCategory(getActivity()); in findOrCreate() 221 pref.setKey(group.name); in findOrCreate() 222 pref.setLayoutResource(R.layout.preference_category_material); in findOrCreate() 223 pref.setTitle(group.loadLabel(pm)); in findOrCreate() 224 prefs.add(pref); in findOrCreate() 225 getPreferenceScreen().addPreference(pref); in findOrCreate() [all …]
|
D | PermissionAppsFragment.java | 232 SwitchPreference pref = new SwitchPreference(context); in onPermissionsLoaded() local 233 pref.setOnPreferenceChangeListener(this); in onPermissionsLoaded() 234 pref.setKey(app.getKey()); in onPermissionsLoaded() 235 pref.setIcon(app.getIcon()); in onPermissionsLoaded() 236 pref.setTitle(app.getLabel()); in onPermissionsLoaded() 238 pref.setSummary(getString(R.string.permission_summary_enforced_by_policy)); in onPermissionsLoaded() 240 pref.setPersistent(false); in onPermissionsLoaded() 241 pref.setEnabled(!app.isPolicyFixed()); in onPermissionsLoaded() 242 pref.setChecked(app.areRuntimePermissionsGranted()); in onPermissionsLoaded() 248 mExtraScreen.addPreference(pref); in onPermissionsLoaded() [all …]
|
/packages/apps/PackageInstaller/src/com/android/packageinstaller/permission/ui/handheld/ |
D | PermissionAppsFragment.java | 265 RestrictedSwitchPreference pref = new RestrictedSwitchPreference(context); in onPermissionsLoaded() local 266 pref.setOnPreferenceChangeListener(this); in onPermissionsLoaded() 267 pref.setKey(app.getKey()); in onPermissionsLoaded() 268 pref.setIcon(app.getIcon()); in onPermissionsLoaded() 269 pref.setTitle(app.getLabel()); in onPermissionsLoaded() 274 pref.setDisabledByAdmin(enforcedAdmin); in onPermissionsLoaded() 275 pref.setSummary(R.string.disabled_by_admin_summary_text); in onPermissionsLoaded() 277 pref.setEnabled(false); in onPermissionsLoaded() 278 pref.setSummary(R.string.permission_summary_enforced_by_policy); in onPermissionsLoaded() 281 pref.setPersistent(false); in onPermissionsLoaded() [all …]
|
D | AllAppPermissionsFragment.java | 176 PreferenceGroup pref = findOrCreate(group, pm, prefs); in updateUi() local 177 pref.addPreference(getPreference(info, perm, group, pm)); in updateUi() 228 PreferenceGroup pref = (PreferenceGroup) findPreference(group.name); in findOrCreate() local 229 if (pref == null) { in findOrCreate() 230 pref = new PreferenceCategory(getContext()); in findOrCreate() 231 pref.setKey(group.name); in findOrCreate() 232 pref.setTitle(group.loadLabel(pm)); in findOrCreate() 233 prefs.add(pref); in findOrCreate() 234 getPreferenceScreen().addPreference(pref); in findOrCreate() 236 return pref; in findOrCreate() [all …]
|
/packages/apps/Settings/src/com/android/settings/vpn2/ |
D | VpnSettings.java | 354 for (Preference pref : updates) { in setShownPreferences() 355 vpnGroup.addPreference(pref); in setShownPreferences() 362 LegacyVpnPreference pref = (LegacyVpnPreference) preference; in onPreferenceClick() local 363 VpnProfile profile = pref.getProfile(); in onPreferenceClick() 376 AppPreference pref = (AppPreference) preference; in onPreferenceClick() local 377 boolean connected = (pref.getState() == AppPreference.STATE_CONNECTED); in onPreferenceClick() 381 UserHandle user = UserHandle.of(pref.getUserId()); in onPreferenceClick() 385 Intent appIntent = pm.getLaunchIntentForPackage(pref.getPackageName()); in onPreferenceClick() 391 Log.w(LOG_TAG, "VPN provider does not exist: " + pref.getPackageName(), nnfe); in onPreferenceClick() 396 PackageInfo pkgInfo = pref.getPackageInfo(); in onPreferenceClick() [all …]
|
/packages/apps/Settings/src/com/android/settings/applications/ |
D | InstalledAppDetails.java | 1129 Preference pref = new Preference(getPrefContext()); 1130 pref.setTitle(R.string.draw_overlay); 1131 pref.setKey("system_alert_window"); 1132 pref.setOnPreferenceClickListener(new OnPreferenceClickListener() { 1140 category.addPreference(pref); 1143 Preference pref = new Preference(getPrefContext()); 1144 pref.setTitle(R.string.write_settings); 1145 pref.setKey("write_settings_apps"); 1146 pref.setOnPreferenceClickListener(new OnPreferenceClickListener() { 1154 category.addPreference(pref); [all …]
|
/packages/apps/LegacyCamera/src/com/android/camera/ |
D | CameraSettings.java | 253 ListPreference pref, List<String> supported) { in filterUnsupportedOptions() argument 258 removePreference(group, pref.getKey()); in filterUnsupportedOptions() 262 pref.filterUnsupported(supported); in filterUnsupportedOptions() 263 if (pref.getEntries().length <= 1) { in filterUnsupportedOptions() 264 removePreference(group, pref.getKey()); in filterUnsupportedOptions() 268 resetIfInvalid(pref); in filterUnsupportedOptions() 271 private void resetIfInvalid(ListPreference pref) { in resetIfInvalid() argument 273 String value = pref.getValue(); in resetIfInvalid() 274 if (pref.findIndexOfValue(value) == NOT_FOUND) { in resetIfInvalid() 275 pref.setValueIndex(0); in resetIfInvalid() [all …]
|
/packages/apps/Settings/src/com/android/settings/users/ |
D | AppRestrictionsFragment.java | 294 AppRestrictionsPreference pref = (AppRestrictionsPreference) in onPackageChanged() local 296 if (pref == null) return; in onPackageChanged() 298 if ((Intent.ACTION_PACKAGE_ADDED.equals(action) && pref.isChecked()) in onPackageChanged() 299 || (Intent.ACTION_PACKAGE_REMOVED.equals(action) && !pref.isChecked())) { in onPackageChanged() 300 pref.setEnabled(true); in onPackageChanged() 310 AppRestrictionsPreference pref = (AppRestrictionsPreference) findPreference( in onDisableUiForPackage() local 312 if (pref != null) { in onDisableUiForPackage() 313 pref.setEnabled(false); in onDisableUiForPackage() 482 Preference pref = mAppList.getPreference(i); in updateAllEntries() local 483 if (pref instanceof AppRestrictionsPreference) { in updateAllEntries() [all …]
|
D | UserSettings.java | 738 UserPreference pref; in updateUserList() local 740 pref = mMePreference; in updateUserList() 757 pref = new UserPreference(getPrefContext(), null, user.id, in updateUserList() 760 pref.setKey("id=" + user.id); in updateUserList() 761 userPreferences.add(pref); in updateUserList() 763 pref.setSummary(R.string.user_admin); in updateUserList() 765 pref.setTitle(user.name); in updateUserList() 766 pref.setSelectable(false); in updateUserList() 768 if (pref == null) { in updateUserList() 773 pref.setSummary(R.string.user_summary_restricted_not_set_up); in updateUserList() [all …]
|
/packages/apps/Settings/src/com/android/settings/widget/ |
D | RadioButtonPickerFragment.java | 117 public void bindPreferenceExtra(RadioButtonPreference pref, in bindPreferenceExtra() argument 143 RadioButtonPreference pref = new RadioButtonPreference(getPrefContext()); in updateCandidates() local 144 bindPreference(pref, app.getKey(), app.getValue(), defaultKey); in updateCandidates() 145 bindPreferenceExtra(pref, app.getKey(), app.getValue(), defaultKey, systemDefaultKey); in updateCandidates() 146 screen.addPreference(pref); in updateCandidates() 152 public RadioButtonPreference bindPreference(RadioButtonPreference pref, in bindPreference() argument 154 pref.setTitle(info.loadLabel()); in bindPreference() 155 pref.setIcon(info.loadIcon()); in bindPreference() 156 pref.setKey(key); in bindPreference() 158 pref.setChecked(true); in bindPreference() [all …]
|
/packages/apps/Settings/src/com/android/settings/dashboard/ |
D | ProgressiveDisclosureMixin.java | 87 for (Preference pref : mCollapsedPrefs) { in onPreferenceClick() 88 screen.addPreference(pref); in onPreferenceClick() 150 public void addPreference(PreferenceScreen screen, Preference pref) { in addPreference() argument 157 if (lastPreference.getOrder() > pref.getOrder()) { in addPreference() 160 screen.addPreference(pref); in addPreference() 164 addToCollapsedList(pref); in addPreference() 168 addToCollapsedList(pref); in addPreference() 172 screen.addPreference(pref); in addPreference() 176 screen.addPreference(pref); in addPreference() 193 final Preference pref = mCollapsedPrefs.get(i); in removePreference() local [all …]
|
D | DashboardFeatureProviderImpl.java | 87 final Preference pref = new Preference(context); in getPreferencesForCategory() local 88 bindPreferenceToTile(activity, sourceMetricsCategory, pref, tile, null /* key */, in getPreferencesForCategory() 90 preferences.add(pref); in getPreferencesForCategory() 115 public void bindPreferenceToTile(Activity activity, int sourceMetricsCategory, Preference pref, in bindPreferenceToTile() argument 117 pref.setTitle(tile.title); in bindPreferenceToTile() 119 pref.setKey(key); in bindPreferenceToTile() 121 pref.setKey(getDashboardKeyForTile(tile)); in bindPreferenceToTile() 124 pref.setSummary(tile.summary); in bindPreferenceToTile() 126 pref.setSummary(R.string.summary_placeholder); in bindPreferenceToTile() 129 pref.setIcon(tile.icon.loadDrawable(activity)); in bindPreferenceToTile() [all …]
|
/packages/apps/LegacyCamera/src/com/android/camera/ui/ |
D | OtherSettingsPopup.java | 59 private int getSettingLayoutId(ListPreference pref) { in getSettingLayoutId() argument 62 if (pref == null) return R.layout.in_line_setting_restore; in getSettingLayoutId() 66 if (CameraSettings.KEY_RECORD_LOCATION.equals(pref.getKey())) { in getSettingLayoutId() 76 ListPreference pref = mListItem.get(position); in getView() 78 int viewLayoutId = getSettingLayoutId(pref); in getView() 82 view.initialize(pref); // no init for restore one in getView() 99 ListPreference pref = group.findPreference(keys[i]); in initialize() local 100 if (pref != null) mListItem.add(pref); in initialize() 126 ListPreference pref = (ListPreference) mListItem.get(j); in overrideSettings() local 127 if (pref != null && key.equals(pref.getKey())) { in overrideSettings() [all …]
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/users/ |
D | AppRestrictionsFragment.java | 327 AppRestrictionsPreference pref = (AppRestrictionsPreference) in onPackageChanged() local 329 if (pref == null) return; in onPackageChanged() 331 if ((Intent.ACTION_PACKAGE_ADDED.equals(action) && pref.isChecked()) in onPackageChanged() 332 || (Intent.ACTION_PACKAGE_REMOVED.equals(action) && !pref.isChecked())) { in onPackageChanged() 333 pref.setEnabled(true); in onPackageChanged() 343 AppRestrictionsPreference pref = (AppRestrictionsPreference) findPreference( in onDisableUiForPackage() local 345 if (pref != null) { in onDisableUiForPackage() 346 pref.setEnabled(false); in onDisableUiForPackage() 523 Preference pref = mAppList.getPreference(i); in updateAllEntries() local 524 if (pref instanceof AppRestrictionsPreference) { in updateAllEntries() [all …]
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/settings/ |
D | DebugSettingsFragment.java | 63 final Preference pref = new DictDumpPreference(getActivity(), dictName); in onCreate() local 64 pref.setOnPreferenceClickListener(this); in onCreate() 65 dictDumpPreferenceGroup.addPreference(pref); in onCreate() 104 public boolean onPreferenceClick(final Preference pref) { in onPreferenceClick() argument 106 if (pref instanceof DictDumpPreference) { in onPreferenceClick() 107 final DictDumpPreference dictDumpPref = (DictDumpPreference)pref; in onPreferenceClick() 156 final SeekBarDialogPreference pref = (SeekBarDialogPreference)findPreference(prefKey); in setupKeyPreviewAnimationScale() local 157 if (pref == null) { in setupKeyPreviewAnimationScale() 160 pref.setInterface(new SeekBarDialogPreference.ValueProxy() { in setupKeyPreviewAnimationScale() 208 final SeekBarDialogPreference pref = (SeekBarDialogPreference)findPreference(prefKey); in setupKeyPreviewAnimationDuration() local [all …]
|
D | ThemeSettingsFragment.java | 46 static void updateKeyboardThemeSummary(final Preference pref) { in updateKeyboardThemeSummary() argument 47 final Context context = pref.getContext(); in updateKeyboardThemeSummary() 54 pref.setSummary(keyboardThemeNames[index]); in updateKeyboardThemeSummary() 70 final KeyboardThemePreference pref = new KeyboardThemePreference( in onCreate() local 72 screen.addPreference(pref); in onCreate() 73 pref.setOnRadioButtonClickedListener(this); in onCreate() 82 final KeyboardThemePreference pref = (KeyboardThemePreference)preference; in onRadioButtonClicked() local 83 mSelectedThemeId = pref.mThemeId; in onRadioButtonClicked() 106 final KeyboardThemePreference pref = (KeyboardThemePreference)preference; in updateSelected() local 107 final boolean selected = (mSelectedThemeId == pref.mThemeId); in updateSelected() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/ |
D | NetworkScorerPickerTest.java | 76 RadioButtonPreference pref = new RadioButtonPreference(mContext); in testOnRadioButtonClicked_success() local 77 pref.setKey(TEST_SCORER_PACKAGE_1); in testOnRadioButtonClicked_success() 78 when(mPreferenceScreen.getPreference(anyInt())).thenReturn(pref); in testOnRadioButtonClicked_success() 83 mFragment.onRadioButtonClicked(pref); in testOnRadioButtonClicked_success() 86 assertThat(pref.isChecked()).isTrue(); in testOnRadioButtonClicked_success() 91 RadioButtonPreference pref = new RadioButtonPreference(mContext); in testOnRadioButtonClicked_currentScorer_doNothing() local 92 pref.setKey(TEST_SCORER_PACKAGE_1); in testOnRadioButtonClicked_currentScorer_doNothing() 93 pref.setChecked(true); in testOnRadioButtonClicked_currentScorer_doNothing() 94 when(mPreferenceScreen.getPreference(anyInt())).thenReturn(pref); in testOnRadioButtonClicked_currentScorer_doNothing() 99 mFragment.onRadioButtonClicked(pref); in testOnRadioButtonClicked_currentScorer_doNothing() [all …]
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/ |
D | BaseSettingsFragment.java | 37 public final boolean onPreferenceStartFragment(PreferenceFragment caller, Preference pref) { in onPreferenceStartFragment() argument 39 Fragment.instantiate(getActivity(), pref.getFragment(), pref.getExtras()); in onPreferenceStartFragment() 50 public final boolean onPreferenceStartScreen(PreferenceFragment caller, PreferenceScreen pref) { in onPreferenceStartScreen() argument 55 public boolean onPreferenceDisplayDialog(@NonNull PreferenceFragment caller, Preference pref) { in onPreferenceDisplayDialog() argument 57 if (pref instanceof LeanbackPickerDialogPreference) { in onPreferenceDisplayDialog() 59 pref; in onPreferenceDisplayDialog() 61 ? LeanbackPickerDialogFragment.newDatePickerInstance(pref.getKey()) in onPreferenceDisplayDialog() 62 : LeanbackPickerDialogFragment.newTimePickerInstance(pref.getKey()); in onPreferenceDisplayDialog() 67 return super.onPreferenceDisplayDialog(caller, pref); in onPreferenceDisplayDialog()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/dashboard/ |
D | ProgressiveDisclosureTest.java | 124 Preference pref = mMixin.findPreference(mScreen, mPreference.getKey()); in findPreference_prefInCollapsedList_shouldFindIt() local 126 assertThat(pref).isNotNull(); in findPreference_prefInCollapsedList_shouldFindIt() 127 assertThat(pref).isSameAs(mPreference); in findPreference_prefInCollapsedList_shouldFindIt() 134 Preference pref = mMixin.findPreference(mScreen, mPreference.getKey()); in findPreference_prefOnScreen_shouldFindIt() local 136 assertThat(pref).isNotNull(); in findPreference_prefOnScreen_shouldFindIt() 137 assertThat(pref).isSameAs(mPreference); in findPreference_prefOnScreen_shouldFindIt() 143 Preference pref = mMixin.findPreference(mScreen, mPreference.getKey()); in findPreference_prefNotInCollapsedListOrScreen_shouldNotFindIt() local 145 assertThat(pref).isNull(); in findPreference_prefNotInCollapsedListOrScreen_shouldNotFindIt() 154 Preference pref = mMixin.findPreference(mScreen, mPreference.getKey()); in findPreference_prefRemovedFromCollapsedList_shouldNotFindIt() local 156 assertThat(pref).isNull(); in findPreference_prefRemovedFromCollapsedList_shouldNotFindIt() [all …]
|
/packages/services/Telecomm/src/com/android/server/telecom/ |
D | RespondViaSmsSettings.java | 99 EditTextPreference pref = (EditTextPreference) preference; in onPreferenceChange() local 105 pref.setTitle((String) newValue); in onPreferenceChange() 109 editor.putString(pref.getKey(), (String) newValue).commit(); in onPreferenceChange() 137 EditTextPreference pref = (EditTextPreference) preference; in initPref() local 138 pref.setText(mPrefs.getString(pref.getKey(), pref.getText())); in initPref() 139 pref.setTitle(pref.getText()); in initPref() 140 pref.setOnPreferenceChangeListener(this); in initPref()
|
/packages/services/Telephony/src/com/android/phone/ |
D | GsmUmtsCallForwardOptions.java | 102 for (CallForwardEditPreference pref : mPreferences) { in onResume() 103 Bundle bundle = mIcicle.getParcelable(pref.getKey()); in onResume() 104 pref.setToggled(bundle.getBoolean(KEY_TOGGLE)); in onResume() 108 pref.handleCallForwardResult(cf); in onResume() 109 pref.init(this, true, mPhone); in onResume() 121 for (CallForwardEditPreference pref : mPreferences) { in onSaveInstanceState() 123 bundle.putBoolean(KEY_TOGGLE, pref.isToggled()); in onSaveInstanceState() 124 if (pref.callForwardInfo != null) { in onSaveInstanceState() 125 bundle.putString(KEY_NUMBER, pref.callForwardInfo.number); in onSaveInstanceState() 126 bundle.putInt(KEY_STATUS, pref.callForwardInfo.status); in onSaveInstanceState() [all …]
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/connectivity/ |
D | NetworkFragment.java | 244 AccessPointPreference pref = (AccessPointPreference) accessPoint.getTag(); in updateWifiList() local 245 if (pref == null) { in updateWifiList() 246 pref = new AccessPointPreference(accessPoint, themedContext, mUserBadgeCache, in updateWifiList() 248 accessPoint.setTag(pref); in updateWifiList() 250 toRemove.remove(pref); in updateWifiList() 253 pref.setFragment(WifiDetailsFragment.class.getName()); in updateWifiList() 254 WifiDetailsFragment.prepareArgs(pref.getExtras(), accessPoint); in updateWifiList() 255 pref.setIntent(null); in updateWifiList() 257 pref.setFragment(null); in updateWifiList() 258 pref.setIntent(WifiConnectionActivity.createIntent(getContext(), accessPoint)); in updateWifiList() [all …]
|
/packages/apps/Settings/src/com/android/settings/network/ |
D | NetworkScorerPicker.java | 92 final RadioButtonPreference pref = new RadioButtonPreference(getPrefContext()); in updateCandidates() local 95 pref.setTitle(appData.getRecommendationServiceLabel()); in updateCandidates() 96 pref.setKey(appKey); in updateCandidates() 97 pref.setChecked(TextUtils.equals(defaultAppKey, appKey)); in updateCandidates() 98 pref.setOnClickListener(this); in updateCandidates() 99 screen.addPreference(pref); in updateCandidates() 127 final Preference pref = screen.getPreference(i); in updateCheckedState() local 128 if (pref instanceof RadioButtonPreference) { in updateCheckedState() 129 final RadioButtonPreference radioPref = (RadioButtonPreference) pref; in updateCheckedState() 130 radioPref.setChecked(TextUtils.equals(pref.getKey(), selectedKey)); in updateCheckedState()
|