Searched refs:preference (Results 1 - 25 of 971) sorted by relevance

1234567891011>>

/packages/apps/UnifiedEmail/src/com/android/mail/ui/settings/
H A DSettingsUtils.java19 import android.preference.Preference;
23 public static void updatePreferenceSummary(Preference preference, String summary, argument
28 preference.setSummary(summary);
31 preference.setSummary(defaultRes);
/packages/apps/EmergencyInfo/src/com/android/emergency/edit/
H A DEditMedicalInfoFragment.java21 import android.support.v14.preference.PreferenceFragment;
22 import android.support.v7.preference.Preference;
45 Preference preference = findPreference(preferenceKey);
46 preference.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
48 public boolean onPreferenceChange(Preference preference, Object value) {
54 preference.getContext(),
59 // If the preference implements OnPreferenceChangeListener, notify it of the
61 if (Preference.OnPreferenceChangeListener.class.isInstance(preference)) {
62 return ((Preference.OnPreferenceChangeListener) preference)
63 .onPreferenceChange(preference, valu
78 onDisplayPreferenceDialog(Preference preference) argument
[all...]
H A DEditInfoFragment.java25 import android.support.v14.preference.PreferenceFragment;
26 import android.support.v7.preference.Preference;
27 import android.support.v7.preference.PreferenceGroup;
28 import android.support.v7.preference.PreferenceManager;
59 Preference preference = findPreference(preferenceKey);
60 mMedicalInfoPreferences.put(preferenceKey, preference);
62 if (((ReloadablePreferenceInterface) preference).isNotSet()) {
63 getMedicalInfoParent().removePreference(preference);
75 public boolean onPreferenceClick(Preference preference) {
103 for (Preference preference
[all...]
/packages/apps/Settings/src/com/android/settings/notification/
H A DZenModePreferenceController.java20 import android.support.v7.preference.Preference;
44 public void updateState(Preference preference) { argument
45 super.updateState(preference);
46 if (preference.isEnabled()) {
47 preference.setSummary(mSummaryBuilder.getAutomaticRulesSummary());
H A DBootSoundPreferenceController.java22 import android.support.v14.preference.SwitchPreference;
23 import android.support.v7.preference.Preference;
24 import android.support.v7.preference.PreferenceScreen;
44 SwitchPreference preference = (SwitchPreference) screen.findPreference(KEY_BOOT_SOUNDS);
45 preference.setChecked(SystemProperties.getBoolean(PROPERTY_BOOT_SOUNDS, true));
50 public boolean handlePreferenceTreeClick(Preference preference) { argument
51 if (KEY_BOOT_SOUNDS.equals(preference.getKey())) {
52 SwitchPreference switchPreference = (SwitchPreference) preference;
H A DVibrateWhenRingPreferenceController.java25 import android.support.v7.preference.Preference;
26 import android.support.v7.preference.PreferenceScreen;
27 import android.support.v7.preference.TwoStatePreference;
52 Preference preference = screen.findPreference(KEY_VIBRATE_WHEN_RINGING);
53 if (preference != null) {
54 mSettingObserver = new SettingObserver(preference);
55 preference.setPersistent(false);
74 public boolean handlePreferenceTreeClick(Preference preference) { argument
89 public void updateState(Preference preference) { argument
90 ((TwoStatePreference) preference)
95 onPreferenceChange(Preference preference, Object newValue) argument
108 SettingObserver(Preference preference) argument
[all...]
/packages/apps/EmergencyInfo/src/com/android/emergency/view/
H A DViewEmergencyInfoFragment.java20 import android.support.v14.preference.PreferenceFragment;
21 import android.support.v7.preference.Preference;
22 import android.support.v7.preference.PreferenceManager;
43 Preference preference = findPreference(preferenceKey);
44 mPreferences.add(preference);
46 if (((ReloadablePreferenceInterface) preference).isNotSet()) {
47 getPreferenceScreen().removePreference(preference);
55 for (Preference preference : mPreferences) {
57 (ReloadablePreferenceInterface) preference;
60 getPreferenceScreen().removePreference(preference);
[all...]
/packages/apps/StorageManager/robotests/src/com/android/storagemanager/deletionhelper/
H A DAppDeletionPreferenceTest.java60 AppDeletionPreference preference = new AppDeletionPreference(mContext, app);
61 preference.updateSummary();
63 assertThat(preference.getPackageName()).isEqualTo(TEST_PACKAGE_NAME);
64 assertThat(preference.getTitle()).isEqualTo(TEST_PACKAGE_LABEL);
65 assertThat(preference.getSummary().toString()).isEqualTo("30 days ago");
66 assertThat(preference.getItemSize()).isEqualTo(KB_STRING);
79 AppDeletionPreference preference = new AppDeletionPreference(mContext, app);
80 preference.updateSummary();
82 assertThat(preference.getPackageName()).isEqualTo(TEST_PACKAGE_NAME);
83 assertThat(preference
[all...]
/packages/apps/Settings/src/com/android/settings/inputmethod/
H A DSpellCheckerPreferenceController.java20 import android.support.v7.preference.Preference;
21 import android.support.v7.preference.PreferenceScreen;
46 final Preference preference = screen.findPreference(KEY_SPELL_CHECKERS);
47 if (preference != null) {
48 InputMethodAndSubtypeUtil.removeUnnecessaryNonPersistentPreference(preference);
63 public void updateState(Preference preference) { argument
64 if (preference == null) {
68 preference.setSummary(R.string.switch_off_text);
72 preference.setSummary(sci.loadLabel(mContext.getPackageManager()));
74 preference
[all...]
/packages/apps/Settings/src/com/android/settings/wifi/tether/
H A DWifiTetherApBandPreferenceController.java24 import android.support.v7.preference.ListPreference;
25 import android.support.v7.preference.Preference;
26 import android.support.v7.preference.PreferenceScreen;
58 ListPreference preference = (ListPreference) mPreference;
60 preference.setEnabled(false);
61 preference.setSummary(R.string.wifi_ap_choose_2G);
63 preference.setEntries(mBandEntries);
64 preference.setEntryValues(BAND_VALUES);
65 preference.setSummary(mBandEntries[mBandIndex]);
66 preference
76 onPreferenceChange(Preference preference, Object newValue) argument
[all...]
H A DWifiTetherSSIDPreferenceController.java22 import android.support.v7.preference.EditTextPreference;
23 import android.support.v7.preference.Preference;
24 import android.support.v7.preference.PreferenceScreen;
62 public boolean onPreferenceChange(Preference preference, Object newValue) { argument
64 updateSsidDisplay((EditTextPreference) preference);
78 private void updateSsidDisplay(EditTextPreference preference) { argument
79 preference.setText(mSSID);
80 preference.setSummary(mSSID);
/packages/apps/Gallery2/src_pd/com/android/gallery3d/settings/
H A DGallerySettings.java19 import android.preference.PreferenceActivity;
/packages/apps/Settings/src/com/android/settings/deviceinfo/
H A DKernelVersionPreferenceController.java19 import android.support.v7.preference.Preference;
40 public void updateState(Preference preference) { argument
41 super.updateState(preference);
42 preference.setSummary(DeviceInfoUtils.getFormattedKernelVersion());
/packages/apps/Settings/src/com/android/settings/wifi/
H A DCellularFallbackPreferenceController.java21 import android.support.v14.preference.SwitchPreference;
22 import android.support.v7.preference.Preference;
53 public boolean handlePreferenceTreeClick(Preference preference) { argument
54 if (!TextUtils.equals(preference.getKey(), KEY_CELLULAR_FALLBACK)) {
57 if (!(preference instanceof SwitchPreference)) {
63 ((SwitchPreference) preference).isChecked() ? "1" : null);
68 public void updateState(Preference preference) { argument
72 if (preference != null) {
73 SwitchPreference pref = (SwitchPreference) preference;
/packages/apps/Settings/tests/robotests/src/com/android/settings/widget/
H A DMasterSwitchPreferenceTest.java20 import android.support.v7.preference.Preference.OnPreferenceChangeListener;
21 import android.support.v7.preference.PreferenceViewHolder;
55 final MasterSwitchPreference preference = new MasterSwitchPreference(mContext);
57 assertThat(preference.getWidgetLayoutResource())
63 final MasterSwitchPreference preference = new MasterSwitchPreference(mContext);
68 preference.onBindViewHolder(holder);
70 preference.setChecked(true);
73 preference.setChecked(false);
79 final MasterSwitchPreference preference = new MasterSwitchPreference(mContext);
84 preference
[all...]
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/accessibility/
H A DAccessibilityShortcutServiceFragment.java27 import android.support.v17.preference.LeanbackPreferenceFragment;
28 import android.support.v17.preference.LeanbackSettingsFragment;
29 import android.support.v7.preference.Preference;
30 import android.support.v7.preference.PreferenceScreen;
48 (preference, newValue) -> {
49 final String newCompString = preference.getKey();
54 final CharSequence label = preference.getTitle();
83 final RadioPreference preference = new RadioPreference(themedContext);
84 preference.setPersistent(false);
85 preference
[all...]
/packages/apps/EmergencyInfo/tests/unit/src/com/android/emergency/preferences/
H A DEmergencyListPreferenceTest.java25 import android.support.v7.preference.PreferenceManager;
61 EmergencyListPreference preference =
63 String summary = (String) preference.getSummary();
73 EmergencyListPreference preference =
75 String summary = preference.getSummary().toString();
85 EmergencyListPreference preference =
87 String title = (String) preference.getTitle();
96 EmergencyListPreference preference =
98 String title = preference.getTitle().toString();
107 EmergencyListPreference preference
[all...]
/packages/apps/Camera2/src/com/android/camera/settings/
H A DListPreferenceFiller.java19 import android.preference.ListPreference;
29 public void fill(List<Size> sizes, ListPreference preference); argument
/packages/apps/Settings/src/com/android/settings/dream/
H A DCurrentDreamPreferenceController.java20 import android.support.v7.preference.Preference;
50 public void updateState(Preference preference) { argument
51 super.updateState(preference);
53 preference.setSummary(mBackend.getActiveDreamName());
54 setGearClickListenerForPreference(preference);
57 private void setGearClickListenerForPreference(Preference preference) { argument
58 if (!(preference instanceof GearPreference)) return;
60 GearPreference gearPreference = (GearPreference)preference;
H A DWhenToDreamPreferenceController.java20 import android.support.v7.preference.Preference;
38 public void updateState(Preference preference) { argument
39 super.updateState(preference);
42 preference.setSummary(preference.getContext().getString(resId));
/packages/apps/Settings/src/com/android/settings/location/
H A DScanningSettings.java20 import android.support.v14.preference.SwitchPreference;
21 import android.support.v7.preference.Preference;
22 import android.support.v7.preference.PreferenceScreen;
69 public boolean onPreferenceTreeClick(Preference preference) { argument
70 String key = preference.getKey();
74 ((SwitchPreference) preference).isChecked() ? 1 : 0);
78 ((SwitchPreference) preference).isChecked() ? 1 : 0);
80 return super.onPreferenceTreeClick(preference);
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/
H A DPreferenceUtils.java25 import android.support.v7.preference.Preference;
26 import android.support.v7.preference.PreferenceGroup;
38 Preference preference, int flags) {
39 if (preference == null) {
43 Intent intent = preference.getIntent();
53 preference.setIntent(new Intent().setClassName(
58 // Set the preference title to the activity's label
59 preference.setTitle(resolveInfo.loadLabel(pm));
67 // Did not find a matching activity, so remove the preference
68 parent.removePreference(preference);
37 resolveSystemActivityOrRemove(Context context, PreferenceGroup parent, Preference preference, int flags) argument
[all...]
/packages/apps/Settings/src/com/android/settings/datausage/
H A DTemplatePreferenceCategory.java19 import android.support.v7.preference.Preference;
20 import android.support.v7.preference.PreferenceCategory;
40 public boolean addPreference(Preference preference) { argument
41 if (!(preference instanceof TemplatePreference)) {
45 return super.addPreference(preference);
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/settings/
H A DTwoStatePreferenceHelper.java20 import android.preference.CheckBoxPreference;
21 import android.preference.Preference;
22 import android.preference.PreferenceGroup;
23 import android.preference.SwitchPreference;
53 final Preference preference = preferences.get(index);
54 if (preference instanceof CheckBoxPreference) {
55 addSwitchPreferenceBasedOnCheckBoxPreference((CheckBoxPreference)preference, group);
57 group.addPreference(preference);
58 if (preference instanceof PreferenceGroup) {
59 replaceAllCheckBoxPreferencesBySwitchPreferences((PreferenceGroup)preference);
[all...]
/packages/apps/StorageManager/src/com/android/storagemanager/deletionhelper/
H A DAppDeletionPreferenceGroup.java21 import android.support.v7.preference.Preference;
22 import android.support.v7.preference.PreferenceScreen;
32 * AppDeletionPreferenceGroup is a collapsible checkbox preference group which contains many
65 AppDeletionPreference preference =
67 if (preference == null) {
68 preference = new AppDeletionPreference(getContext(), app);
69 preference.setKey(packageName);
70 preference.setOnPreferenceChangeListener(this);
72 addThresholdDependentPreference(preference, isNoThreshold());
73 preference
81 addThresholdDependentPreference( AppDeletionPreference preference, boolean isThresholded) argument
95 addPreferenceToScreen(AppDeletionPreference preference) argument
103 onPreferenceChange(Preference preference, Object newValue) argument
[all...]

Completed in 584 milliseconds

1234567891011>>