[Dependency: Quadtree] Remove unused code from cache controller (#3163)

This commit is contained in:
Vivek Maskara 2019-10-05 17:05:58 +05:30 committed by Josephine Lim
parent f13a4d4da7
commit 2e0281eaee

View file

@ -16,7 +16,6 @@ import timber.log.Timber;
@Singleton @Singleton
public class CacheController { public class CacheController {
private final GpsCategoryModel gpsCategoryModel;
private final QuadTree<List<String>> quadTree; private final QuadTree<List<String>> quadTree;
private double x, y; private double x, y;
private double xMinus, xPlus, yMinus, yPlus; private double xMinus, xPlus, yMinus, yPlus;
@ -24,8 +23,7 @@ public class CacheController {
private static final int EARTH_RADIUS = 6378137; private static final int EARTH_RADIUS = 6378137;
@Inject @Inject
CacheController(GpsCategoryModel gpsCategoryModel) { CacheController() {
this.gpsCategoryModel = gpsCategoryModel;
quadTree = new QuadTree<>(-180, -90, +180, +90); quadTree = new QuadTree<>(-180, -90, +180, +90);
} }
@ -36,17 +34,6 @@ public class CacheController {
Timber.d("X (longitude) value: %f, Y (latitude) value: %f", x, y); Timber.d("X (longitude) value: %f, Y (latitude) value: %f", x, y);
} }
public void cacheCategory() {
List<String> pointCatList = new ArrayList<>();
if (gpsCategoryModel.getGpsCatExists()) {
pointCatList.addAll(gpsCategoryModel.getCategoryList());
Timber.d("Categories being cached: %s", pointCatList);
} else {
Timber.d("No categories found, so no categories cached");
}
quadTree.set(x, y, pointCatList);
}
public List<String> findCategory() { public List<String> findCategory() {
Point<List<String>>[] pointsFound; Point<List<String>>[] pointsFound;
//Convert decLatitude and decLongitude to a coordinate offset range //Convert decLatitude and decLongitude to a coordinate offset range