Lines Matching refs:preference
28 import android.preference.Preference;
29 import android.preference.PreferenceGroup;
30 import android.preference.SwitchPreference;
38 Preference.OnPreferenceChangeListener {
47 SwitchPreference preference;
89 final SwitchPreference preference = new SwitchPreference(context);
90 agent.preference = preference;
91 preference.setPersistent(false);
92 preference.setTitle(agent.label);
93 preference.setIcon(agent.icon);
94 preference.setPersistent(false);
95 preference.setOnPreferenceChangeListener(this);
96 preference.setChecked(mActiveAgents.contains(agent.component));
97 category.addPreference(agent.preference);
136 public boolean onPreferenceChange(Preference preference, Object newValue) {
137 if (preference instanceof SwitchPreference) {
141 if (agent.preference == preference) {