diff --git a/app/src/googleplay/java/org/tasks/location/GeofenceTransitionsIntentService.java b/app/src/googleplay/java/org/tasks/location/GeofenceTransitionsIntentService.java index 1538fef1d..c6726e7f9 100644 --- a/app/src/googleplay/java/org/tasks/location/GeofenceTransitionsIntentService.java +++ b/app/src/googleplay/java/org/tasks/location/GeofenceTransitionsIntentService.java @@ -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()); } diff --git a/app/src/main/java/org/tasks/Notifier.java b/app/src/main/java/org/tasks/Notifier.java index ec21790ec..00c3ce484 100644 --- a/app/src/main/java/org/tasks/Notifier.java +++ b/app/src/main/java/org/tasks/Notifier.java @@ -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 entries) { List notifications = new ArrayList<>(); boolean ringFiveTimes = false;