Remove Notifier.triggerNotification

pull/820/head
Alex Baker 5 years ago
parent b93c1de5dc
commit aac1401e42

@ -4,6 +4,7 @@ import static com.google.android.gms.location.Geofence.GEOFENCE_TRANSITION_ENTER
import static com.google.android.gms.location.Geofence.GEOFENCE_TRANSITION_EXIT;
import static com.todoroo.astrid.reminders.ReminderService.TYPE_GEOFENCE_ENTER;
import static com.todoroo.astrid.reminders.ReminderService.TYPE_GEOFENCE_EXIT;
import static java.util.Collections.singletonList;
import static org.tasks.time.DateTimeUtils.currentTimeMillis;
import android.content.BroadcastReceiver;
@ -57,8 +58,9 @@ public class GeofenceTransitionsIntentService extends InjectingJobIntentService
com.google.android.gms.location.Geofence triggeringGeofence, boolean arrival) {
String requestId = triggeringGeofence.getRequestId();
try {
notifier.triggerNotification(
toNotification(locationDao.getGeofence(Long.parseLong(requestId)), arrival));
notifier.triggerNotifications(
singletonList(
toNotification(locationDao.getGeofence(Long.parseLong(requestId)), arrival)));
} catch (Exception e) {
Timber.e(e, "Error triggering geofence %s: %s", requestId, e.getMessage());
}

@ -19,7 +19,6 @@ import com.todoroo.astrid.data.Task;
import com.todoroo.astrid.reminders.ReminderService;
import com.todoroo.astrid.voice.VoiceOutputAssistant;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import javax.inject.Inject;
import org.tasks.injection.ForApplication;
@ -105,10 +104,6 @@ public class Notifier {
notificationManager.notify(filter.listingTitle.hashCode(), builder, true, false, false);
}
public void triggerNotification(Notification notification) {
triggerNotifications(Collections.singletonList(notification));
}
public void triggerNotifications(List<Notification> entries) {
List<org.tasks.notifications.Notification> notifications = new ArrayList<>();
boolean ringFiveTimes = false;

Loading…
Cancel
Save