Fix generic compile

pull/996/head
Alex Baker 6 years ago
parent 22ef5f1e8d
commit 694321d38a

@ -1,8 +1,8 @@
package org.tasks.location; package org.tasks.location;
import java.util.List;
import javax.inject.Inject; import javax.inject.Inject;
import org.tasks.data.Location; import org.jetbrains.annotations.Nullable;
import org.tasks.data.Place;
@SuppressWarnings("EmptyMethod") @SuppressWarnings("EmptyMethod")
public class GeofenceApi { public class GeofenceApi {
@ -10,15 +10,11 @@ public class GeofenceApi {
@Inject @Inject
public GeofenceApi() {} public GeofenceApi() {}
public void register(Location location) {}
public void register(List<Location> activeGeofences) {}
public void cancel(Location geofence) {}
public void registerAll() {} public void registerAll() {}
public void cancel(long taskId) {} public void update(@Nullable Place place) {}
public void update(String place) {}
public void register(long taskId) {} public void update(long taskId) {}
} }

@ -11,7 +11,6 @@ import com.google.android.gms.location.GeofencingRequest;
import com.google.android.gms.location.GeofencingRequest.Builder; import com.google.android.gms.location.GeofencingRequest.Builder;
import com.google.android.gms.location.LocationServices; import com.google.android.gms.location.LocationServices;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import java.util.List;
import javax.inject.Inject; import javax.inject.Inject;
import org.tasks.data.LocationDao; import org.tasks.data.LocationDao;
import org.tasks.data.MergedGeofence; import org.tasks.data.MergedGeofence;
@ -37,7 +36,9 @@ public class GeofenceApi {
} }
public void registerAll() { public void registerAll() {
update(locationDao.getPlacesWithGeofences()); for (Place place : locationDao.getPlacesWithGeofences()) {
update(place);
}
} }
public void update(long taskId) { public void update(long taskId) {
@ -48,12 +49,6 @@ public class GeofenceApi {
update(locationDao.getPlace(place)); update(locationDao.getPlace(place));
} }
private void update(List<Place> places) {
for (Place place : places) {
update(place);
}
}
public void update(@Nullable Place place) { public void update(@Nullable Place place) {
if (place == null || !permissionChecker.canAccessLocation()) { if (place == null || !permissionChecker.canAccessLocation()) {
return; return;

Loading…
Cancel
Save