aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/maps/google
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/cgeo/geocaching/maps/google')
-rw-r--r--main/src/cgeo/geocaching/maps/google/v1/GoogleCacheOverlay.java26
-rw-r--r--main/src/cgeo/geocaching/maps/google/v1/GoogleCacheOverlayItem.java2
-rw-r--r--main/src/cgeo/geocaching/maps/google/v1/GoogleGeoPoint.java2
-rw-r--r--main/src/cgeo/geocaching/maps/google/v1/GoogleMapActivity.java22
-rw-r--r--main/src/cgeo/geocaching/maps/google/v1/GoogleMapController.java14
-rw-r--r--main/src/cgeo/geocaching/maps/google/v1/GoogleMapItemFactory.java2
-rw-r--r--main/src/cgeo/geocaching/maps/google/v1/GoogleMapProjection.java6
-rw-r--r--main/src/cgeo/geocaching/maps/google/v1/GoogleMapProvider.java2
8 files changed, 38 insertions, 38 deletions
diff --git a/main/src/cgeo/geocaching/maps/google/v1/GoogleCacheOverlay.java b/main/src/cgeo/geocaching/maps/google/v1/GoogleCacheOverlay.java
index 9b18c2d..3d2b83c 100644
--- a/main/src/cgeo/geocaching/maps/google/v1/GoogleCacheOverlay.java
+++ b/main/src/cgeo/geocaching/maps/google/v1/GoogleCacheOverlay.java
@@ -21,10 +21,10 @@ import java.util.concurrent.locks.ReentrantLock;
*/
public class GoogleCacheOverlay extends ItemizedOverlay<GoogleCacheOverlayItem> implements ItemizedOverlayImpl {
- private CachesOverlay base;
- private Lock lock = new ReentrantLock();
+ private final CachesOverlay base;
+ private final Lock lock = new ReentrantLock();
- public GoogleCacheOverlay(Context contextIn, Drawable markerIn) {
+ public GoogleCacheOverlay(final Context contextIn, final Drawable markerIn) {
super(boundCenterBottom(markerIn));
base = new CachesOverlay(this, contextIn);
}
@@ -35,7 +35,7 @@ public class GoogleCacheOverlay extends ItemizedOverlay<GoogleCacheOverlayItem>
}
@Override
- protected GoogleCacheOverlayItem createItem(int i) {
+ protected GoogleCacheOverlayItem createItem(final int i) {
if (base == null) {
return null;
}
@@ -53,7 +53,7 @@ public class GoogleCacheOverlay extends ItemizedOverlay<GoogleCacheOverlayItem>
}
@Override
- protected boolean onTap(int arg0) {
+ protected boolean onTap(final int arg0) {
if (base == null) {
return false;
}
@@ -62,11 +62,11 @@ public class GoogleCacheOverlay extends ItemizedOverlay<GoogleCacheOverlayItem>
}
@Override
- public void draw(Canvas canvas, MapView mapView, boolean shadow) {
+ public void draw(final Canvas canvas, final MapView mapView, final boolean shadow) {
base.draw(canvas, castMapViewImpl(mapView), shadow);
}
- private static MapViewImpl castMapViewImpl(MapView mapView) {
+ private static MapViewImpl castMapViewImpl(final MapView mapView) {
assert mapView instanceof MapViewImpl;
return (MapViewImpl) mapView;
}
@@ -77,28 +77,28 @@ public class GoogleCacheOverlay extends ItemizedOverlay<GoogleCacheOverlayItem>
}
@Override
- public Drawable superBoundCenterBottom(Drawable marker) {
+ public Drawable superBoundCenterBottom(final Drawable marker) {
return ItemizedOverlay.boundCenterBottom(marker);
}
@Override
- public void superSetLastFocusedItemIndex(int i) {
+ public void superSetLastFocusedItemIndex(final int i) {
super.setLastFocusedIndex(i);
}
@Override
- public boolean superOnTap(int index) {
+ public boolean superOnTap(final int index) {
return super.onTap(index);
}
@Override
- public void superDraw(Canvas canvas, MapViewImpl mapView, boolean shadow) {
+ public void superDraw(final Canvas canvas, final MapViewImpl mapView, final boolean shadow) {
super.draw(canvas, (MapView) mapView, shadow);
}
@Override
- public void superDrawOverlayBitmap(Canvas canvas, Point drawPosition,
- MapProjectionImpl projection, byte drawZoomLevel) {
+ public void superDrawOverlayBitmap(final Canvas canvas, final Point drawPosition,
+ final MapProjectionImpl projection, final byte drawZoomLevel) {
// Nothing to do here...
}
diff --git a/main/src/cgeo/geocaching/maps/google/v1/GoogleCacheOverlayItem.java b/main/src/cgeo/geocaching/maps/google/v1/GoogleCacheOverlayItem.java
index 463aae9..977d67c 100644
--- a/main/src/cgeo/geocaching/maps/google/v1/GoogleCacheOverlayItem.java
+++ b/main/src/cgeo/geocaching/maps/google/v1/GoogleCacheOverlayItem.java
@@ -10,7 +10,7 @@ public class GoogleCacheOverlayItem extends OverlayItem implements CachesOverlay
final private IWaypoint coord;
final private boolean applyDistanceRule;
- public GoogleCacheOverlayItem(final IWaypoint coordinate, boolean applyDistanceRule) {
+ public GoogleCacheOverlayItem(final IWaypoint coordinate, final boolean applyDistanceRule) {
super(new GeoPoint(coordinate.getCoords().getLatitudeE6(), coordinate.getCoords().getLongitudeE6()), coordinate.getName(), "");
this.coord = coordinate;
diff --git a/main/src/cgeo/geocaching/maps/google/v1/GoogleGeoPoint.java b/main/src/cgeo/geocaching/maps/google/v1/GoogleGeoPoint.java
index 7fbfac2..3f89807 100644
--- a/main/src/cgeo/geocaching/maps/google/v1/GoogleGeoPoint.java
+++ b/main/src/cgeo/geocaching/maps/google/v1/GoogleGeoPoint.java
@@ -7,7 +7,7 @@ import com.google.android.maps.GeoPoint;
public class GoogleGeoPoint extends GeoPoint implements GeoPointImpl {
- public GoogleGeoPoint(int latitudeE6, int longitudeE6) {
+ public GoogleGeoPoint(final int latitudeE6, final int longitudeE6) {
super(latitudeE6, longitudeE6);
}
diff --git a/main/src/cgeo/geocaching/maps/google/v1/GoogleMapActivity.java b/main/src/cgeo/geocaching/maps/google/v1/GoogleMapActivity.java
index 374e7b0..04078cb 100644
--- a/main/src/cgeo/geocaching/maps/google/v1/GoogleMapActivity.java
+++ b/main/src/cgeo/geocaching/maps/google/v1/GoogleMapActivity.java
@@ -16,7 +16,7 @@ import android.view.View;
public class GoogleMapActivity extends MapActivity implements MapActivityImpl, FilteredActivity {
- private AbstractMap mapBase;
+ private final AbstractMap mapBase;
public GoogleMapActivity() {
mapBase = new CGeoMap(this);
@@ -33,7 +33,7 @@ public class GoogleMapActivity extends MapActivity implements MapActivityImpl, F
}
@Override
- protected void onCreate(Bundle icicle) {
+ protected void onCreate(final Bundle icicle) {
mapBase.onCreate(icicle);
}
@@ -58,17 +58,17 @@ public class GoogleMapActivity extends MapActivity implements MapActivityImpl, F
}
@Override
- public boolean onCreateOptionsMenu(Menu menu) {
+ public boolean onCreateOptionsMenu(final Menu menu) {
return mapBase.onCreateOptionsMenu(menu);
}
@Override
- public boolean onOptionsItemSelected(MenuItem item) {
+ public boolean onOptionsItemSelected(final MenuItem item) {
return mapBase.onOptionsItemSelected(item);
}
@Override
- public boolean onPrepareOptionsMenu(Menu menu) {
+ public boolean onPrepareOptionsMenu(final Menu menu) {
return mapBase.onPrepareOptionsMenu(menu);
}
@@ -78,12 +78,12 @@ public class GoogleMapActivity extends MapActivity implements MapActivityImpl, F
}
@Override
- public void superOnCreate(Bundle savedInstanceState) {
+ public void superOnCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
- public boolean superOnCreateOptionsMenu(Menu menu) {
+ public boolean superOnCreateOptionsMenu(final Menu menu) {
return super.onCreateOptionsMenu(menu);
}
@@ -93,12 +93,12 @@ public class GoogleMapActivity extends MapActivity implements MapActivityImpl, F
}
@Override
- public boolean superOnOptionsItemSelected(MenuItem item) {
+ public boolean superOnOptionsItemSelected(final MenuItem item) {
return super.onOptionsItemSelected(item);
}
@Override
- public void navigateUp(View view) {
+ public void navigateUp(final View view) {
ActivityMixin.navigateUp(this);
}
@@ -118,12 +118,12 @@ public class GoogleMapActivity extends MapActivity implements MapActivityImpl, F
}
@Override
- public boolean superOnPrepareOptionsMenu(Menu menu) {
+ public boolean superOnPrepareOptionsMenu(final Menu menu) {
return super.onPrepareOptionsMenu(menu);
}
@Override
- public void showFilterMenu(View view) {
+ public void showFilterMenu(final View view) {
// do nothing, the filter bar only shows the global filter
}
}
diff --git a/main/src/cgeo/geocaching/maps/google/v1/GoogleMapController.java b/main/src/cgeo/geocaching/maps/google/v1/GoogleMapController.java
index ea95676..a533a76 100644
--- a/main/src/cgeo/geocaching/maps/google/v1/GoogleMapController.java
+++ b/main/src/cgeo/geocaching/maps/google/v1/GoogleMapController.java
@@ -8,34 +8,34 @@ import com.google.android.maps.MapController;
public class GoogleMapController implements MapControllerImpl {
- private MapController mapController;
+ private final MapController mapController;
- public GoogleMapController(MapController mapControllerIn) {
+ public GoogleMapController(final MapController mapControllerIn) {
mapController = mapControllerIn;
}
@Override
- public void animateTo(GeoPointImpl geoPoint) {
+ public void animateTo(final GeoPointImpl geoPoint) {
mapController.animateTo(castToGeoPointImpl(geoPoint));
}
- private static GeoPoint castToGeoPointImpl(GeoPointImpl geoPoint) {
+ private static GeoPoint castToGeoPointImpl(final GeoPointImpl geoPoint) {
assert geoPoint instanceof GeoPoint;
return (GeoPoint) geoPoint;
}
@Override
- public void setCenter(GeoPointImpl geoPoint) {
+ public void setCenter(final GeoPointImpl geoPoint) {
mapController.setCenter(castToGeoPointImpl(geoPoint));
}
@Override
- public void setZoom(int mapzoom) {
+ public void setZoom(final int mapzoom) {
mapController.setZoom(mapzoom);
}
@Override
- public void zoomToSpan(int latSpanE6, int lonSpanE6) {
+ public void zoomToSpan(final int latSpanE6, final int lonSpanE6) {
mapController.zoomToSpan(latSpanE6, lonSpanE6);
}
diff --git a/main/src/cgeo/geocaching/maps/google/v1/GoogleMapItemFactory.java b/main/src/cgeo/geocaching/maps/google/v1/GoogleMapItemFactory.java
index 5fedf69..a35eda8 100644
--- a/main/src/cgeo/geocaching/maps/google/v1/GoogleMapItemFactory.java
+++ b/main/src/cgeo/geocaching/maps/google/v1/GoogleMapItemFactory.java
@@ -14,7 +14,7 @@ public class GoogleMapItemFactory implements MapItemFactory {
}
@Override
- public CachesOverlayItemImpl getCachesOverlayItem(final IWaypoint coordinate, boolean applyDistanceRule) {
+ public CachesOverlayItemImpl getCachesOverlayItem(final IWaypoint coordinate, final boolean applyDistanceRule) {
return new GoogleCacheOverlayItem(coordinate, applyDistanceRule);
}
}
diff --git a/main/src/cgeo/geocaching/maps/google/v1/GoogleMapProjection.java b/main/src/cgeo/geocaching/maps/google/v1/GoogleMapProjection.java
index 901a369..8a03bbb 100644
--- a/main/src/cgeo/geocaching/maps/google/v1/GoogleMapProjection.java
+++ b/main/src/cgeo/geocaching/maps/google/v1/GoogleMapProjection.java
@@ -10,14 +10,14 @@ import android.graphics.Point;
public class GoogleMapProjection implements MapProjectionImpl {
- private Projection projection;
+ private final Projection projection;
- public GoogleMapProjection(Projection projectionIn) {
+ public GoogleMapProjection(final Projection projectionIn) {
projection = projectionIn;
}
@Override
- public void toPixels(GeoPointImpl leftGeo, Point left) {
+ public void toPixels(final GeoPointImpl leftGeo, final Point left) {
projection.toPixels((GeoPoint) leftGeo, left);
}
diff --git a/main/src/cgeo/geocaching/maps/google/v1/GoogleMapProvider.java b/main/src/cgeo/geocaching/maps/google/v1/GoogleMapProvider.java
index 884e076..8c9dd4d 100644
--- a/main/src/cgeo/geocaching/maps/google/v1/GoogleMapProvider.java
+++ b/main/src/cgeo/geocaching/maps/google/v1/GoogleMapProvider.java
@@ -83,7 +83,7 @@ public final class GoogleMapProvider extends AbstractMapProvider {
private static final class GoogleSatelliteSource extends AbstractGoogleMapSource {
- public GoogleSatelliteSource(MapProvider mapProvider, String name) {
+ public GoogleSatelliteSource(final MapProvider mapProvider, final String name) {
super(GOOGLE_SATELLITE_ID, mapProvider, name);
}