Home | History | Annotate | Download | only in settings

Lines Matching full:preference

30 import android.preference.CheckBoxPreference;
31 import android.preference.Preference;
32 import android.preference.PreferenceActivity;
33 import android.preference.PreferenceCategory;
34 import android.preference.PreferenceGroup;
35 import android.preference.PreferenceScreen;
112 CheckBoxPreference preference = (CheckBoxPreference) findPreference(key);
113 if (preference != null) {
114 preference.setChecked(enabled.contains(key));
177 Preference pref = mAccessibilityServicesCategory.getPreference(i);
183 public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
184 final String key = preference.getKey();
187 boolean isChecked = ((CheckBoxPreference) preference).isChecked();
188 handleEnableAccessibilityStateChange((CheckBoxPreference) preference);
190 boolean isChecked = ((CheckBoxPreference) preference).isChecked();
198 } else if (preference instanceof CheckBoxPreference) {
199 handleEnableAccessibilityServiceStateChange((CheckBoxPreference) preference);
202 return super.onPreferenceTreeClick(preferenceScreen, preference);
208 * @param preference The preference for enabling/disabling accessibility.
210 private void handleEnableAccessibilityStateChange(CheckBoxPreference preference) {
211 if (preference.isChecked()) {
216 final CheckBoxPreference checkBoxPreference = preference;
242 * Handles the change of the preference for enabling/disabling an AccessibilityService.
244 * @param preference The preference.
246 private void handleEnableAccessibilityServiceStateChange(CheckBoxPreference preference) {
247 if (preference.isChecked()) {
248 final CheckBoxPreference checkBoxPreference = preference;
253 mAccessibilityServices.get(preference.getKey())
286 CheckBoxPreference preference = (CheckBoxPreference) findPreference(key);
287 if (preference.isChecked()) {
321 CheckBoxPreference preference = new CheckBoxPreference(this);
322 preference.setKey(key);
323 preference.setTitle(serviceInfo.loadLabel(getPackageManager()));
324 mAccessibilityServicesCategory.addPreference(preference);