Remove unused tracking events

pull/935/head
Alex Baker 5 years ago
parent 16e64def54
commit 4d901351da

@ -15,51 +15,20 @@ public class Tracker {
private static boolean enabled;
private final FirebaseAnalytics analytics;
private final Context context;
@Inject
public Tracker(@ForApplication Context context, Preferences preferences) {
this.context = context;
enabled = preferences.isTrackingEnabled();
if (enabled) {
analytics = FirebaseAnalytics.getInstance(context);
FirebaseAnalytics analytics = FirebaseAnalytics.getInstance(context);
analytics.setAnalyticsCollectionEnabled(true);
Fabric.with(context, new Crashlytics());
} else {
analytics = null;
}
}
public static void report(Throwable t) {
public void reportException(Throwable t) {
Timber.e(t);
if (enabled) {
Crashlytics.logException(t);
}
}
public void reportException(Throwable t) {
report(t);
}
public void reportEvent(Tracking.Events event) {
reportEvent(event, null);
}
public void reportEvent(Tracking.Events event, String label) {
reportEvent(event, event.action, label);
}
public void reportEvent(Tracking.Events event, int action, String label) {
reportEvent(event, context.getString(action), label);
}
public void reportEvent(Tracking.Events event, String action, String label) {
reportEvent(event.category, action, label);
}
private void reportEvent(int categoryRes, String action, String label) {
if (!enabled) {
return;
}
}
}

@ -8,21 +8,7 @@ public class Tracker {
@Inject
public Tracker() {}
public static void report(Exception e) {
Timber.e(e);
}
public void reportException(Throwable t) {
Timber.e(t);
}
public void reportEvent(Tracking.Events event) {}
public void reportEvent(Tracking.Events event, String string) {}
public void reportEvent(Tracking.Events setPreference, int resId, String s) {}
public void reportEvent(Tracking.Events category, String action, String label) {}
public void reportIabResult(int resultCode, String skus) {}
}

@ -22,11 +22,9 @@ public class Tracker {
private static boolean enabled;
private final FirebaseAnalytics analytics;
private final Context context;
@Inject
public Tracker(@ForApplication Context context, Preferences preferences) {
this.context = context;
enabled = preferences.isTrackingEnabled();
if (enabled) {
analytics = FirebaseAnalytics.getInstance(context);
@ -37,39 +35,13 @@ public class Tracker {
}
}
public static void report(Throwable t) {
public void reportException(Throwable t) {
Timber.e(t);
if (enabled) {
Crashlytics.logException(t);
}
}
public void reportException(Throwable t) {
report(t);
}
public void reportEvent(Tracking.Events event) {
reportEvent(event, null);
}
public void reportEvent(Tracking.Events event, String label) {
reportEvent(event, event.action, label);
}
public void reportEvent(Tracking.Events event, int action, String label) {
reportEvent(event, context.getString(action), label);
}
public void reportEvent(Tracking.Events event, String action, String label) {
reportEvent(event.category, action, label);
}
private void reportEvent(int categoryRes, String action, String label) {
if (!enabled) {
return;
}
}
public void reportIabResult(@BillingResponse int response, String sku) {
if (!enabled) {
return;

@ -82,9 +82,6 @@ import org.tasks.activities.FilterSettingsActivity;
import org.tasks.activities.GoogleTaskListSettingsActivity;
import org.tasks.activities.RemoteListSupportPicker;
import org.tasks.activities.TagSettingsActivity;
import org.tasks.analytics.Tracker;
import org.tasks.analytics.Tracking;
import org.tasks.caldav.BaseCaldavCalendarSettingsActivity;
import org.tasks.caldav.CaldavCalendarSettingsActivity;
import org.tasks.data.CaldavAccount;
import org.tasks.data.CaldavCalendar;
@ -136,7 +133,6 @@ public final class TaskListFragment extends InjectingFragment
private static final int SEARCH_DEBOUNCE_TIMEOUT = 300;
private final RefreshReceiver refreshReceiver = new RefreshReceiver();
@Inject protected Tracker tracker;
protected CompositeDisposable disposables;
@Inject SyncAdapters syncAdapters;
@Inject TaskDeleter taskDeleter;
@ -464,7 +460,6 @@ public final class TaskListFragment extends InjectingFragment
}
private void clearCompleted() {
tracker.reportEvent(Tracking.Events.CLEAR_COMPLETED);
disposables.add(
Single.fromCallable(() -> taskDeleter.clearCompleted(filter))
.subscribeOn(Schedulers.io())
@ -589,7 +584,6 @@ public final class TaskListFragment extends InjectingFragment
break;
case REQUEST_MOVE_TASKS:
if (resultCode == RESULT_OK) {
tracker.reportEvent(Tracking.Events.MULTISELECT_MOVE);
taskMover.move(
taskAdapter.getSelected(),
data.getParcelableExtra(RemoteListSupportPicker.EXTRA_SELECTED_FILTER));

@ -20,8 +20,6 @@ import com.todoroo.astrid.api.GtasksFilter;
import javax.inject.Inject;
import org.tasks.R;
import org.tasks.activities.CalendarSelectionActivity;
import org.tasks.analytics.Tracker;
import org.tasks.analytics.Tracking;
import org.tasks.calendars.AndroidCalendar;
import org.tasks.calendars.CalendarProvider;
import org.tasks.dialogs.DialogBuilder;
@ -48,7 +46,6 @@ public class DefaultsPreferences extends InjectingPreferenceActivity
@Inject Preferences preferences;
@Inject CalendarProvider calendarProvider;
@Inject ActivityPermissionRequestor permissionRequester;
@Inject Tracker tracker;
@Inject DefaultFilterProvider defaultFilterProvider;
@Inject Locale locale;
@Inject Device device;
@ -146,7 +143,6 @@ public class DefaultsPreferences extends InjectingPreferenceActivity
@Override
public void selectedList(Filter list) {
tracker.reportEvent(Tracking.Events.DEFAULT_REMOTE_LIST);
if (list == null) {
preferences.setString(R.string.p_default_remote_list, null);
} else if (list instanceof GtasksFilter || list instanceof CaldavFilter) {

@ -20,8 +20,6 @@ import java.util.ArrayList;
import java.util.Map;
import javax.inject.Inject;
import org.tasks.R;
import org.tasks.analytics.Tracker;
import org.tasks.analytics.Tracking;
import org.tasks.data.CaldavDao;
import org.tasks.data.CaldavTask;
import org.tasks.data.GoogleTask;
@ -40,7 +38,6 @@ public class TaskCreator {
private final Preferences preferences;
private final TagDao tagDao;
private final GoogleTaskDao googleTaskDao;
private final Tracker tracker;
private final DefaultFilterProvider defaultFilterProvider;
private final CaldavDao caldavDao;
private final TagDataDao tagDataDao;
@ -54,7 +51,6 @@ public class TaskCreator {
TaskDao taskDao,
TagDao tagDao,
GoogleTaskDao googleTaskDao,
Tracker tracker,
DefaultFilterProvider defaultFilterProvider,
CaldavDao caldavDao) {
this.gcalHelper = gcalHelper;
@ -63,7 +59,6 @@ public class TaskCreator {
this.taskDao = taskDao;
this.tagDao = tagDao;
this.googleTaskDao = googleTaskDao;
this.tracker = tracker;
this.defaultFilterProvider = defaultFilterProvider;
this.caldavDao = caldavDao;
}
@ -172,7 +167,6 @@ public class TaskCreator {
task.setPriority(Integer.valueOf((String) value));
break;
default:
tracker.reportEvent(Tracking.Events.TASK_CREATION_FAILED, "Unhandled key: " + key);
break;
}
break;

@ -19,7 +19,6 @@ import java.util.List;
import javax.inject.Inject;
import org.tasks.R;
import org.tasks.analytics.Tracker;
import org.tasks.analytics.Tracking;
import org.tasks.caldav.CaldavUtils;
import org.tasks.data.CaldavDao;
import org.tasks.data.CaldavTask;
@ -102,7 +101,6 @@ public class Upgrader {
run(from, V6_8_1, this::migrateCaldavFilters);
run(from, V6_9, this::applyCaldavCategories);
run(from, V7_0, this::applyCaldavSubtasks);
tracker.reportEvent(Tracking.Events.UPGRADE, Integer.toString(from));
}
preferences.setCurrentVersion(to);
}

@ -22,8 +22,6 @@ import io.reactivex.Completable;
import io.reactivex.schedulers.Schedulers;
import javax.inject.Inject;
import org.tasks.R;
import org.tasks.analytics.Tracker;
import org.tasks.analytics.Tracking;
import org.tasks.injection.ForApplication;
import org.tasks.intents.TaskIntents;
import org.tasks.notifications.NotificationManager;
@ -32,23 +30,19 @@ public class TimerPlugin {
private final Context context;
private final NotificationManager notificationManager;
private final Tracker tracker;
private final TaskDao taskDao;
@Inject
public TimerPlugin(
@ForApplication Context context,
NotificationManager notificationManager,
Tracker tracker,
TaskDao taskDao) {
this.context = context;
this.notificationManager = notificationManager;
this.tracker = tracker;
this.taskDao = taskDao;
}
public void startTimer(Task task) {
tracker.reportEvent(Tracking.Events.TIMER_START);
updateTimer(task, true);
}

@ -1,57 +0,0 @@
package org.tasks.analytics;
import org.tasks.R;
public class Tracking {
public enum Events {
SET_DEFAULT_LIST(R.string.tracking_category_preferences, R.string.p_default_list),
SET_BADGE_LIST(R.string.tracking_category_preferences, R.string.p_badge_list),
DEFAULT_REMOTE_LIST(R.string.tracking_category_preferences, R.string.p_default_remote_list),
SET_THEME(R.string.tracking_category_preferences, R.string.p_theme),
SET_COLOR(R.string.tracking_category_preferences, R.string.p_theme_color),
SET_ACCENT(R.string.tracking_category_preferences, R.string.p_theme_accent),
SET_LAUNCHER(R.string.tracking_category_preferences, R.string.p_theme_launcher),
SET_TAG_COLOR(R.string.tracking_category_tags, R.string.p_theme_color),
WIDGET_ADD(R.string.tracking_category_widget, R.string.tracking_action_add),
TIMER_START(R.string.tracking_category_timer, R.string.tracking_action_start),
GTASK_ENABLED(R.string.tracking_category_google_tasks, R.string.tracking_action_on),
GTASK_NEW_LIST(R.string.tracking_category_google_tasks, R.string.tracking_action_new_list),
GTASK_RENAME_LIST(
R.string.tracking_category_google_tasks, R.string.tracking_action_rename_list),
GTASK_DELETE_LIST(
R.string.tracking_category_google_tasks, R.string.tracking_action_delete_list),
GTASK_SET_COLOR(R.string.tracking_category_google_tasks, R.string.p_theme_color),
MULTISELECT_DELETE(
R.string.tracking_category_event, R.string.tracking_event_multiselect_delete),
MULTISELECT_CLONE(R.string.tracking_category_event, R.string.tracking_event_multiselect_clone),
MULTISELECT_MOVE(R.string.tracking_category_event, R.string.tracking_event_multiselect_move),
CLEAR_COMPLETED(R.string.tracking_category_event, R.string.tracking_action_clear_completed),
UPGRADE(R.string.tracking_category_event, R.string.tracking_event_upgrade),
TASK_CREATION_FAILED(R.string.tracking_category_error, R.string.tracking_event_task_creation),
SET_PREFERENCE(R.string.tracking_category_preferences, 0),
PLAY_SERVICES_WARNING(
R.string.tracking_category_event, R.string.tracking_event_play_services_error),
RECURRENCE_CUSTOM(R.string.tracking_category_recurrence, R.string.tracking_action_custom),
RECURRENCE_PRESET(R.string.tracking_category_recurrence, R.string.tracking_action_preset),
TASKER_CREATE(R.string.tracking_category_tasker, R.string.tracking_action_task_created),
TASKER_LIST_NOTIFICATION(
R.string.tracking_category_tasker, R.string.tracking_action_list_notification),
IMPORT_XML(R.string.tracking_category_backup, R.string.tracking_action_import_xml),
IMPORT_JSON(R.string.tracking_category_backup, R.string.tracking_action_import_json),
EXPORT(R.string.tracking_category_backup, R.string.tracking_action_export),
CALDAV_ACCOUNT_ADDED(R.string.tracking_category_caldav, R.string.tracking_action_add_account),
CALDAV_ACCOUNT_REMOVED(
R.string.tracking_category_caldav, R.string.tracking_action_remove_account),
CALDAV_LIST_ADDED(R.string.tracking_category_caldav, R.string.tracking_action_new_list),
CALDAV_LIST_DELETED(R.string.tracking_category_caldav, R.string.tracking_action_delete_list);
public final int category;
public final int action;
Events(int category, int action) {
this.category = category;
this.action = action;
}
}
}

@ -30,8 +30,6 @@ import java.net.URI;
import java.net.URISyntaxException;
import javax.inject.Inject;
import org.tasks.R;
import org.tasks.analytics.Tracker;
import org.tasks.analytics.Tracking.Events;
import org.tasks.billing.Inventory;
import org.tasks.data.CaldavAccount;
import org.tasks.data.CaldavDao;
@ -48,7 +46,6 @@ public abstract class BaseCaldavAccountSettingsActivity extends ThemedInjectingA
public static final String EXTRA_CALDAV_DATA = "caldavData"; // $NON-NLS-1$
protected static final String PASSWORD_MASK = "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022";
@Inject protected Tracker tracker;
@Inject protected CaldavDao caldavDao;
@Inject protected Encryption encryption;
@Inject DialogBuilder dialogBuilder;
@ -355,7 +352,6 @@ public abstract class BaseCaldavAccountSettingsActivity extends ThemedInjectingA
protected void removeAccount() {
taskDeleter.delete(caldavAccount);
tracker.reportEvent(Events.CALDAV_ACCOUNT_REMOVED);
setResult(RESULT_OK);
finish();
}

@ -7,7 +7,6 @@ import androidx.lifecycle.ViewModelProviders;
import com.todoroo.astrid.helper.UUIDHelper;
import javax.inject.Inject;
import org.tasks.R;
import org.tasks.analytics.Tracking.Events;
import org.tasks.data.CaldavAccount;
import org.tasks.gtasks.PlayServices;
import org.tasks.injection.ActivityComponent;
@ -54,8 +53,6 @@ public class CaldavAccountSettingsActivity extends BaseCaldavAccountSettingsActi
newAccount.setUuid(UUIDHelper.newUUID());
newAccount.setId(caldavDao.insert(newAccount));
tracker.reportEvent(Events.CALDAV_ACCOUNT_ADDED);
setResult(RESULT_OK);
finish();
}

@ -5,8 +5,6 @@ import android.app.ProgressDialog;
import android.os.Bundle;
import androidx.annotation.NonNull;
import javax.inject.Inject;
import org.tasks.analytics.Tracker;
import org.tasks.analytics.Tracking;
import org.tasks.backup.TasksJsonExporter;
import org.tasks.injection.InjectingNativeDialogFragment;
import org.tasks.injection.NativeDialogFragmentComponent;
@ -15,7 +13,6 @@ public class ExportTasksDialog extends InjectingNativeDialogFragment {
@Inject DialogBuilder dialogBuilder;
@Inject TasksJsonExporter tasksJsonExporter;
@Inject Tracker tracker;
public static ExportTasksDialog newExportTasksDialog() {
return new ExportTasksDialog();
@ -34,7 +31,6 @@ public class ExportTasksDialog extends InjectingNativeDialogFragment {
setCancelable(false);
tasksJsonExporter.exportTasks(
getActivity(), TasksJsonExporter.ExportType.EXPORT_TYPE_MANUAL, progressDialog);
tracker.reportEvent(Tracking.Events.EXPORT);
return progressDialog;
}

@ -12,8 +12,6 @@ import com.todoroo.andlib.utility.DialogUtilities;
import com.todoroo.astrid.backup.TasksXmlImporter;
import javax.inject.Inject;
import org.tasks.R;
import org.tasks.analytics.Tracker;
import org.tasks.analytics.Tracking;
import org.tasks.backup.TasksJsonImporter;
import org.tasks.backup.TasksJsonImporter.ImportResult;
import org.tasks.injection.ForActivity;
@ -29,7 +27,6 @@ public class ImportTasksDialog extends InjectingNativeDialogFragment {
@Inject TasksXmlImporter xmlImporter;
@Inject TasksJsonImporter jsonImporter;
@Inject DialogBuilder dialogBuilder;
@Inject Tracker tracker;
@Inject @ForActivity Context context;
@Inject Toaster toaster;
@ -68,11 +65,9 @@ public class ImportTasksDialog extends InjectingNativeDialogFragment {
});
})
.start();
tracker.reportEvent(Tracking.Events.IMPORT_JSON);
break;
case "xml":
xmlImporter.importTasks(getActivity(), data, progressDialog);
tracker.reportEvent(Tracking.Events.IMPORT_XML);
break;
default:
throw new RuntimeException("Invalid extension: " + extension);

@ -20,8 +20,6 @@ import com.todoroo.astrid.activity.MainActivity;
import com.todoroo.astrid.api.Filter;
import javax.inject.Inject;
import org.tasks.R;
import org.tasks.analytics.Tracker;
import org.tasks.analytics.Tracking;
import org.tasks.dialogs.DialogBuilder;
import org.tasks.locale.Locale;
import org.tasks.preferences.AppCompatPreferenceActivity;
@ -38,7 +36,6 @@ public abstract class InjectingPreferenceActivity extends AppCompatPreferenceAct
@Inject DialogBuilder dialogBuilder;
@Inject Device device;
@Inject Tracker tracker;
private ActivityComponent activityComponent;
private Bundle result;
@ -211,7 +208,6 @@ public abstract class InjectingPreferenceActivity extends AppCompatPreferenceAct
findPreference(getString(resId))
.setOnPreferenceChangeListener(
(preference, newValue) -> {
tracker.reportEvent(Tracking.Events.SET_PREFERENCE, resId, newValue.toString());
result.putBoolean(extra, true);
return true;
});

@ -7,8 +7,6 @@ import androidx.annotation.NonNull;
import com.todoroo.astrid.api.Filter;
import javax.inject.Inject;
import org.tasks.Notifier;
import org.tasks.analytics.Tracker;
import org.tasks.analytics.Tracking;
import org.tasks.injection.ForApplication;
import org.tasks.injection.InjectingJobIntentService;
import org.tasks.injection.ServiceComponent;
@ -23,7 +21,6 @@ public class TaskerIntentService extends InjectingJobIntentService {
@Inject Notifier notifier;
@Inject DefaultFilterProvider defaultFilterProvider;
@Inject TaskerTaskCreator taskerTaskCreator;
@Inject Tracker tracker;
@Override
protected void doWork(@NonNull Intent intent) {
@ -39,10 +36,8 @@ public class TaskerIntentService extends InjectingJobIntentService {
defaultFilterProvider.getFilterFromPreference(
bundle.getString(ListNotificationBundle.BUNDLE_EXTRA_STRING_FILTER));
notifier.triggerFilterNotification(filter);
tracker.reportEvent(Tracking.Events.TASKER_LIST_NOTIFICATION);
} else if (TaskCreationBundle.isBundleValid(bundle)) {
taskerTaskCreator.handle(new TaskCreationBundle(bundle));
tracker.reportEvent(Tracking.Events.TASKER_CREATE);
} else {
Timber.e("Invalid bundle: %s", bundle);
}

@ -40,9 +40,6 @@ import org.tasks.R;
import org.tasks.activities.ColorPickerActivity;
import org.tasks.activities.ColorPickerActivity.ColorPalette;
import org.tasks.activities.FilterSelectionActivity;
import org.tasks.analytics.Tracker;
import org.tasks.analytics.Tracking;
import org.tasks.analytics.Tracking.Events;
import org.tasks.billing.Inventory;
import org.tasks.caldav.CaldavAccountSettingsActivity;
import org.tasks.data.CaldavAccount;
@ -92,7 +89,6 @@ public class BasicPreferences extends InjectingPreferenceActivity
public static final int REQUEST_CALDAV_SETTINGS = 10013;
public static final int REQUEST_GOOGLE_TASKS = 10014;
@Inject Tracker tracker;
@Inject Preferences preferences;
@Inject ThemeBase themeBase;
@Inject ThemeColor themeColor;
@ -236,8 +232,6 @@ public class BasicPreferences extends InjectingPreferenceActivity
findPreference(getString(R.string.p_layout_direction))
.setOnPreferenceChangeListener(
(preference, o) -> {
tracker.reportEvent(
Tracking.Events.SET_PREFERENCE, R.string.p_layout_direction, o.toString());
int newValue = Integer.parseInt((String) o);
if (locale.getDirectionality()
!= locale.withDirectionality(newValue).getDirectionality()) {
@ -562,7 +556,6 @@ public class BasicPreferences extends InjectingPreferenceActivity
int index = data.getIntExtra(ColorPickerActivity.EXTRA_THEME_INDEX, 0);
preferences.setInt(R.string.p_theme, index);
themeCache.getThemeBase(index).setDefaultNightMode();
tracker.reportEvent(Tracking.Events.SET_THEME, Integer.toString(index));
forceRestart();
recreate();
}
@ -570,7 +563,6 @@ public class BasicPreferences extends InjectingPreferenceActivity
if (resultCode == RESULT_OK) {
int index = data.getIntExtra(ColorPickerActivity.EXTRA_THEME_INDEX, 0);
preferences.setInt(R.string.p_theme_color, index);
tracker.reportEvent(Tracking.Events.SET_COLOR, Integer.toString(index));
forceRestart();
recreate();
}
@ -578,7 +570,6 @@ public class BasicPreferences extends InjectingPreferenceActivity
if (resultCode == RESULT_OK) {
int index = data.getIntExtra(ColorPickerActivity.EXTRA_THEME_INDEX, 0);
preferences.setInt(R.string.p_theme_accent, index);
tracker.reportEvent(Tracking.Events.SET_ACCENT, Integer.toString(index));
forceRestart();
recreate();
}
@ -587,7 +578,6 @@ public class BasicPreferences extends InjectingPreferenceActivity
int index = data.getIntExtra(ColorPickerActivity.EXTRA_THEME_INDEX, 0);
setLauncherIcon(index);
preferences.setInt(R.string.p_theme_launcher, index);
tracker.reportEvent(Events.SET_LAUNCHER, Integer.toString(index));
recreate();
}
} else if (requestCode == RC_PREFS) {
@ -658,7 +648,6 @@ public class BasicPreferences extends InjectingPreferenceActivity
preferences.remove(R.string.p_language);
} else {
preferences.setString(R.string.p_language, override);
tracker.reportEvent(Tracking.Events.SET_PREFERENCE, R.string.p_language, override);
}
updateLocale();
if (!locale.equals(newValue)) {
@ -725,7 +714,6 @@ public class BasicPreferences extends InjectingPreferenceActivity
}
if (resId > 0) {
forceRestart();
tracker.reportEvent(Tracking.Events.SET_PREFERENCE, resId, Integer.toString(value));
}
}

@ -8,8 +8,6 @@ import android.widget.Toast;
import javax.inject.Inject;
import org.tasks.R;
import org.tasks.activities.TimePickerActivity;
import org.tasks.analytics.Tracker;
import org.tasks.analytics.Tracking;
import org.tasks.injection.ActivityComponent;
import org.tasks.injection.InjectingPreferenceActivity;
import org.tasks.locale.Locale;
@ -28,7 +26,6 @@ public class DateTimePreferences extends InjectingPreferenceActivity
@Inject Locale locale;
@Inject Preferences preferences;
@Inject Tracker tracker;
@Override
public void onCreate(Bundle savedInstanceState) {
@ -149,7 +146,6 @@ public class DateTimePreferences extends InjectingPreferenceActivity
}
}
tracker.reportEvent(Tracking.Events.SET_PREFERENCE, preference.getKey(), newValue.toString());
return true;
}

@ -23,8 +23,6 @@ import com.todoroo.astrid.gtasks.GtasksFilterExposer;
import com.todoroo.astrid.tags.TagFilterExposer;
import javax.inject.Inject;
import org.tasks.R;
import org.tasks.analytics.Tracker;
import org.tasks.analytics.Tracking;
import org.tasks.caldav.CaldavFilterExposer;
import org.tasks.injection.ForApplication;
import timber.log.Timber;
@ -44,7 +42,6 @@ public class DefaultFilterProvider {
private final Context context;
private final Preferences preferences;
private final Tracker tracker;
private final CustomFilterExposer customFilterExposer;
private final TagFilterExposer tagFilterExposer;
private final GtasksFilterExposer gtasksFilterExposer;
@ -54,14 +51,12 @@ public class DefaultFilterProvider {
public DefaultFilterProvider(
@ForApplication Context context,
Preferences preferences,
Tracker tracker,
CustomFilterExposer customFilterExposer,
TagFilterExposer tagFilterExposer,
GtasksFilterExposer gtasksFilterExposer,
CaldavFilterExposer caldavFilterExposer) {
this.context = context;
this.preferences = preferences;
this.tracker = tracker;
this.customFilterExposer = customFilterExposer;
this.tagFilterExposer = tagFilterExposer;
this.gtasksFilterExposer = gtasksFilterExposer;
@ -81,7 +76,6 @@ public class DefaultFilterProvider {
}
public void setBadgeFilter(Filter filter) {
tracker.reportEvent(Tracking.Events.SET_BADGE_LIST);
setFilterPreference(filter, R.string.p_badge_list);
}
@ -90,7 +84,6 @@ public class DefaultFilterProvider {
}
void setDefaultFilter(Filter filter) {
tracker.reportEvent(Tracking.Events.SET_DEFAULT_LIST);
setFilterPreference(filter, R.string.p_default_list);
}

@ -22,8 +22,6 @@ import com.todoroo.astrid.repeats.RepeatControlSet;
import java.util.List;
import javax.inject.Inject;
import org.tasks.R;
import org.tasks.analytics.Tracker;
import org.tasks.analytics.Tracking;
import org.tasks.dialogs.DialogBuilder;
import org.tasks.injection.DialogFragmentComponent;
import org.tasks.injection.ForActivity;
@ -42,7 +40,6 @@ public class BasicRecurrenceDialog extends InjectingDialogFragment {
@Inject DialogBuilder dialogBuilder;
@Inject RepeatRuleToString repeatRuleToString;
@Inject Theme theme;
@Inject Tracker tracker;
public static BasicRecurrenceDialog newBasicRecurrenceDialog(
RepeatControlSet target, RRule rrule, long dueDate) {
@ -139,8 +136,6 @@ public class BasicRecurrenceDialog extends InjectingDialogFragment {
result.setFreq(YEARLY);
break;
}
tracker.reportEvent(Tracking.Events.RECURRENCE_PRESET, result.toIcal());
}
RepeatControlSet target = (RepeatControlSet) getTargetFragment();

@ -60,8 +60,6 @@ import java.util.List;
import javax.inject.Inject;
import org.tasks.R;
import org.tasks.activities.DatePickerActivity;
import org.tasks.analytics.Tracker;
import org.tasks.analytics.Tracking;
import org.tasks.dialogs.DialogBuilder;
import org.tasks.injection.DialogFragmentComponent;
import org.tasks.injection.ForActivity;
@ -82,7 +80,6 @@ public class CustomRecurrenceDialog extends InjectingDialogFragment {
@Inject @ForActivity Context context;
@Inject DialogBuilder dialogBuilder;
@Inject Locale locale;
@Inject Tracker tracker;
@BindView(R.id.weekGroup)
LinearLayout weekGroup1;
@ -382,7 +379,6 @@ public class CustomRecurrenceDialog extends InjectingDialogFragment {
} else {
rrule.setByDay(Collections.emptyList());
}
tracker.reportEvent(Tracking.Events.RECURRENCE_CUSTOM, rrule.toIcal());
RepeatControlSet target = (RepeatControlSet) getTargetFragment();
if (target != null) {
target.onSelected(rrule);

@ -20,8 +20,6 @@ import org.tasks.R;
import org.tasks.activities.ColorPickerActivity;
import org.tasks.activities.ColorPickerActivity.ColorPalette;
import org.tasks.activities.FilterSelectionActivity;
import org.tasks.analytics.Tracker;
import org.tasks.analytics.Tracking;
import org.tasks.injection.ActivityComponent;
import org.tasks.injection.InjectingAppCompatActivity;
import org.tasks.intents.TaskIntents;
@ -38,7 +36,6 @@ public class ShortcutConfigActivity extends InjectingAppCompatActivity {
private static final int REQUEST_COLOR_PICKER = 1020;
@Inject DefaultFilterProvider defaultFilterProvider;
@Inject Tracker tracker;
@Inject ThemeColor themeColor;
@Inject ThemeCache themeCache;
@ -181,8 +178,6 @@ public class ShortcutConfigActivity extends InjectingAppCompatActivity {
}
private void save() {
tracker.reportEvent(Tracking.Events.WIDGET_ADD, getString(R.string.FSA_label));
String filterId = defaultFilterProvider.getFilterPreferenceValue(selectedFilter);
Intent shortcutIntent = TaskIntents.getTaskListByIdIntent(this, filterId);
Parcelable icon = ShortcutIconResource.fromContext(this, ThemeColor.ICONS[getThemeIndex()]);

@ -226,40 +226,6 @@
<string name="p_default_list">default_list</string>
<string name="tracking_category_preferences">Preferences</string>
<string name="tracking_category_widget">Widget</string>
<string name="tracking_category_timer">Timer</string>
<string name="tracking_category_tags">Tags</string>
<string name="tracking_category_recurrence">Recurrence</string>
<string name="tracking_category_google_tasks">Gtask</string>
<string name="tracking_category_event">Event</string>
<string name="tracking_category_error">Error</string>
<string name="tracking_category_tasker">Tasker</string>
<string name="tracking_category_backup">Backup</string>
<string name="tracking_category_caldav">Caldav</string>
<string name="tracking_action_add">Add</string>
<string name="tracking_action_start">Start</string>
<string name="tracking_action_new_list">New List</string>
<string name="tracking_action_add_account">Add Account</string>
<string name="tracking_action_remove_account">Remove Account</string>
<string name="tracking_action_rename_list">Rename List</string>
<string name="tracking_action_delete_list">Delete List</string>
<string name="tracking_action_on">On</string>
<string name="tracking_action_clear_completed">Clear completed</string>
<string name="tracking_action_custom">Custom</string>
<string name="tracking_action_preset">Preset</string>
<string name="tracking_action_task_created">Task created</string>
<string name="tracking_action_list_notification">List Notification</string>
<string name="tracking_action_import_xml">Import XML</string>
<string name="tracking_action_import_json">Import JSON</string>
<string name="tracking_action_export">Export</string>
<string name="tracking_event_play_services_error">Play Services Error</string>
<string name="tracking_event_upgrade">Upgrade</string>
<string name="tracking_event_task_creation">Task creation</string>
<string name="tracking_event_multiselect_delete">Multiselect delete</string>
<string name="tracking_event_multiselect_clone">Multiselect clone</string>
<string name="tracking_event_multiselect_move">Multiselect move</string>
<string name="p_badges_enabled">badges_enabled</string>
<string name="p_badge_list">badge_list</string>
<string name="tasker_locale">Tasker/Locale</string>

Loading…
Cancel
Save