Instrument preferences that we might someday kill

pull/14/head
Sam Bosley 13 years ago
parent edcf83db16
commit 259315e53f

@ -59,6 +59,7 @@ import com.todoroo.astrid.producteev.ProducteevUtilities;
import com.todoroo.astrid.service.AddOnService; import com.todoroo.astrid.service.AddOnService;
import com.todoroo.astrid.service.MarketStrategy.AmazonMarketStrategy; import com.todoroo.astrid.service.MarketStrategy.AmazonMarketStrategy;
import com.todoroo.astrid.service.StartupService; import com.todoroo.astrid.service.StartupService;
import com.todoroo.astrid.service.StatisticsConstants;
import com.todoroo.astrid.service.StatisticsService; import com.todoroo.astrid.service.StatisticsService;
import com.todoroo.astrid.service.TaskService; import com.todoroo.astrid.service.TaskService;
import com.todoroo.astrid.sync.SyncProviderPreferences; import com.todoroo.astrid.sync.SyncProviderPreferences;
@ -549,7 +550,13 @@ public class EditPreferences extends TodorooPreferenceActivity {
} }
}); });
} else if (r.getString(R.string.p_show_featured_lists_labs).equals(preference.getKey())) { } else if (r.getString(R.string.p_show_featured_lists_labs).equals(preference.getKey())) {
preference.setOnPreferenceChangeListener(new SetResultOnPreferenceChangeListener(SyncProviderPreferences.RESULT_CODE_SYNCHRONIZE)); preference.setOnPreferenceChangeListener(new SetResultOnPreferenceChangeListener(SyncProviderPreferences.RESULT_CODE_SYNCHRONIZE) {
@Override
public boolean onPreferenceChange(Preference p, Object newValue) {
StatisticsService.reportEvent(StatisticsConstants.PREF_SHOW_FEATURED_LISTS, "enabled", newValue.toString()); //$NON-NLS-1$
return super.onPreferenceChange(p, newValue);
}
});
} }
else if (r.getString(R.string.p_voiceInputEnabled).equals(preference.getKey())) { else if (r.getString(R.string.p_voiceInputEnabled).equals(preference.getKey())) {
if (value != null && !(Boolean)value) if (value != null && !(Boolean)value)
@ -632,6 +639,22 @@ public class EditPreferences extends TodorooPreferenceActivity {
return true; return true;
} }
}); });
findPreference(getString(R.string.p_third_party_addons)).setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
StatisticsService.reportEvent(StatisticsConstants.PREF_THIRD_PARTY_ADDONS, "enabled", newValue.toString()); //$NON-NLS-1$
return true;
}
});
findPreference(getString(R.string.p_showNotes)).setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
StatisticsService.reportEvent(StatisticsConstants.PREF_SHOW_NOTES_IN_ROW, "enabled", newValue.toString()); //$NON-NLS-1$
return true;
}
});
} }
private void onVoiceReminderStatusChanged(final Preference preference, boolean newValue) { private void onVoiceReminderStatusChanged(final Preference preference, boolean newValue) {

@ -72,6 +72,10 @@ public class StatisticsConstants {
public static final String TASK_RABBIT_POST = "task-rabbit-post"; public static final String TASK_RABBIT_POST = "task-rabbit-post";
public static final String TASK_RABBIT_LOGIN = "task-rabbit-login"; public static final String TASK_RABBIT_LOGIN = "task-rabbit-login";
public static final String PREF_THIRD_PARTY_ADDONS = "pref-third-party-addons";
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 TASK_THREE_DAYS = "task-created-three-days"; 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_ONE_WEEK = "task-created-one-week";
public static final String TASK_TWO_WEEKS = "task-created-two-weeks"; public static final String TASK_TWO_WEEKS = "task-created-two-weeks";

Loading…
Cancel
Save