aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/CacheDetailActivity.java
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/cgeo/geocaching/CacheDetailActivity.java')
-rw-r--r--main/src/cgeo/geocaching/CacheDetailActivity.java19
1 files changed, 2 insertions, 17 deletions
diff --git a/main/src/cgeo/geocaching/CacheDetailActivity.java b/main/src/cgeo/geocaching/CacheDetailActivity.java
index 1b31463..9dffeb2 100644
--- a/main/src/cgeo/geocaching/CacheDetailActivity.java
+++ b/main/src/cgeo/geocaching/CacheDetailActivity.java
@@ -160,24 +160,9 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
return;
}
- try {
- final StringBuilder dist = new StringBuilder();
-
- if (geo.getCoords() != null && cache != null && cache.getCoords() != null) {
- dist.append(Units.getDistanceFromKilometers(geo.getCoords().distanceTo(cache.getCoords())));
- }
-
- if (cache != null && cache.getElevation() != null) {
- if (geo.getAltitude() != 0.0) {
- final float diff = (float) (cache.getElevation() - geo.getAltitude());
- dist.append(' ').append(Units.getElevation(diff));
- }
- }
-
- cacheDistanceView.setText(dist.toString());
+ if (geo.getCoords() != null && cache != null && cache.getCoords() != null) {
+ cacheDistanceView.setText(Units.getDistanceFromKilometers(geo.getCoords().distanceTo(cache.getCoords())));
cacheDistanceView.bringToFront();
- } catch (final Exception e) {
- Log.w("Failed to update location.");
}
}
};