Record statistics for some preference changes

pull/14/head
Sam Bosley 12 years ago
parent c2058f8a7e
commit 54e9b707ac

@ -481,6 +481,9 @@ public class EditPreferences extends TodorooPreferenceActivity {
preference.setOnPreferenceChangeListener(new SetResultOnPreferenceChangeListener(RESULT_CODE_PERFORMANCE_PREF_CHANGED) {
@Override
public boolean onPreferenceChange(Preference p, Object newValue) {
String valueString = newValue.toString();
StatisticsService.reportEvent(StatisticsConstants.PREF_CHANGED_PREFIX + "row-style", //$NON-NLS-1$
"changed-to", valueString); //$NON-NLS-1$
Preference notes = findPreference(getString(R.string.p_showNotes));
notes.setEnabled(!(Boolean) newValue);
return super.onPreferenceChange(p, newValue);
@ -675,6 +678,14 @@ public class EditPreferences extends TodorooPreferenceActivity {
return true;
}
});
findPreference(getString(R.string.p_fullTaskTitle)).setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
StatisticsService.reportEvent(StatisticsConstants.PREF_CHANGED_PREFIX + "full-title", "full-title", newValue.toString()); //$NON-NLS-1$ //$NON-NLS-2$
return true;
}
});
}
private void onVoiceReminderStatusChanged(final Preference preference, boolean newValue) {

@ -76,6 +76,8 @@ public class StatisticsConstants {
public static final String PREF_SHOW_NOTES_IN_ROW = "pref-show-notes";
public static final String PREF_SHOW_FEATURED_LISTS = "pref-show-featured-lists";
public static final String PREF_CHANGED_PREFIX = "pref-changed-";
public static final String TASK_THREE_DAYS = "task-created-three-days";
public static final String TASK_ONE_WEEK = "task-created-one-week";
public static final String TASK_TWO_WEEKS = "task-created-two-weeks";

Loading…
Cancel
Save