mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Merge pull request #247 from whym/linterrors
Fixes to some errors found by lint ("Inspect code" on Android Studio)
This commit is contained in:
commit
1f99460f99
3 changed files with 3 additions and 4 deletions
|
|
@ -6,6 +6,7 @@ import com.github.varunpant.quadtree.Point;
|
||||||
import com.github.varunpant.quadtree.QuadTree;
|
import com.github.varunpant.quadtree.QuadTree;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import fr.free.nrw.commons.upload.MwVolleyApi;
|
import fr.free.nrw.commons.upload.MwVolleyApi;
|
||||||
|
|
@ -47,7 +48,7 @@ public class CacheController {
|
||||||
convertCoordRange();
|
convertCoordRange();
|
||||||
pointsFound = quadTree.searchWithin(xMinus, yMinus, xPlus, yPlus);
|
pointsFound = quadTree.searchWithin(xMinus, yMinus, xPlus, yPlus);
|
||||||
List<String> displayCatList = new ArrayList<String>();
|
List<String> displayCatList = new ArrayList<String>();
|
||||||
Log.d(TAG, "Points found in quadtree: " + pointsFound);
|
Log.d(TAG, "Points found in quadtree: " + Arrays.asList(pointsFound));
|
||||||
|
|
||||||
if (pointsFound.length != 0) {
|
if (pointsFound.length != 0) {
|
||||||
Log.d(TAG, "Entering for loop");
|
Log.d(TAG, "Entering for loop");
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,6 @@ public class NearbyPlaces {
|
||||||
String line;
|
String line;
|
||||||
|
|
||||||
while ((line = in.readLine()) != null) {
|
while ((line = in.readLine()) != null) {
|
||||||
line = in.readLine();
|
|
||||||
|
|
||||||
// Skip CSV header.
|
// Skip CSV header.
|
||||||
if (firstLine) {
|
if (firstLine) {
|
||||||
|
|
@ -58,7 +57,6 @@ public class NearbyPlaces {
|
||||||
}
|
}
|
||||||
|
|
||||||
String type = fields[3];
|
String type = fields[3];
|
||||||
String image;
|
|
||||||
|
|
||||||
places.add(new Place(
|
places.add(new Place(
|
||||||
name,
|
name,
|
||||||
|
|
|
||||||
|
|
@ -153,7 +153,7 @@ public class UploadService extends HandlerService<Contribution> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||||
if(intent.getAction() == ACTION_START_SERVICE && freshStart) {
|
if(intent.getAction().equals(ACTION_START_SERVICE) && freshStart) {
|
||||||
ContentValues failedValues = new ContentValues();
|
ContentValues failedValues = new ContentValues();
|
||||||
failedValues.put(Contribution.Table.COLUMN_STATE, Contribution.STATE_FAILED);
|
failedValues.put(Contribution.Table.COLUMN_STATE, Contribution.STATE_FAILED);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue