mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
[Dependency: Quadtree] Remove unused code from cache controller (#3163)
This commit is contained in:
parent
f13a4d4da7
commit
2e0281eaee
1 changed files with 1 additions and 14 deletions
|
|
@ -16,7 +16,6 @@ import timber.log.Timber;
|
|||
@Singleton
|
||||
public class CacheController {
|
||||
|
||||
private final GpsCategoryModel gpsCategoryModel;
|
||||
private final QuadTree<List<String>> quadTree;
|
||||
private double x, y;
|
||||
private double xMinus, xPlus, yMinus, yPlus;
|
||||
|
|
@ -24,8 +23,7 @@ public class CacheController {
|
|||
private static final int EARTH_RADIUS = 6378137;
|
||||
|
||||
@Inject
|
||||
CacheController(GpsCategoryModel gpsCategoryModel) {
|
||||
this.gpsCategoryModel = gpsCategoryModel;
|
||||
CacheController() {
|
||||
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);
|
||||
}
|
||||
|
||||
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() {
|
||||
Point<List<String>>[] pointsFound;
|
||||
//Convert decLatitude and decLongitude to a coordinate offset range
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue