Send analytics event after importing from xml

pull/1004/head
Alex Baker 4 years ago
parent f77b6e48dd
commit f1c863d2f3

@ -24,6 +24,7 @@ import java.io.InputStreamReader;
import javax.inject.Inject;
import org.tasks.LocalBroadcastManager;
import org.tasks.R;
import org.tasks.analytics.Firebase;
import org.tasks.backup.XmlReader;
import org.tasks.data.Alarm;
import org.tasks.data.AlarmDao;
@ -57,6 +58,7 @@ public class TasksXmlImporter {
private final TagDao tagDao;
private final GoogleTaskDao googleTaskDao;
private final TaskMover taskMover;
private final Firebase firebase;
private final LocationDao locationDao;
private Activity activity;
private Handler handler;
@ -78,7 +80,8 @@ public class TasksXmlImporter {
AlarmDao alarmDao,
TagDao tagDao,
GoogleTaskDao googleTaskDao,
TaskMover taskMover) {
TaskMover taskMover,
Firebase firebase) {
this.tagDataDao = tagDataDao;
this.userActivityDao = userActivityDao;
this.dialogBuilder = dialogBuilder;
@ -89,6 +92,7 @@ public class TasksXmlImporter {
this.tagDao = tagDao;
this.googleTaskDao = googleTaskDao;
this.taskMover = taskMover;
this.firebase = firebase;
}
private void setProgressMessage(final String message) {
@ -107,8 +111,10 @@ public class TasksXmlImporter {
try {
performImport();
taskMover.migrateLocalTasks();
//noinspection unchecked
firebase.logEvent(R.string.event_xml_import);
} catch (IOException | XmlPullParserException e) {
Timber.e(e);
firebase.reportException(e);
}
})
.start();

@ -378,4 +378,5 @@
<string name="param_user_no_churn">user_no_churn</string>
<string name="param_user_pro">user_pro</string>
<string name="param_click">click</string>
<string name="event_xml_import">xml_import</string>
</resources>

Loading…
Cancel
Save