diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2013-07-14 13:58:20 +0200 |
|---|---|---|
| committer | Samuel Tardieu <sam@rfc1149.net> | 2013-07-14 13:58:20 +0200 |
| commit | c9e2182c6db930fb4794e20b7009b12051f9b108 (patch) | |
| tree | 61af639f648bc3e39ab990c53a1401d97e2bd110 /main/src/cgeo/geocaching/CacheDetailActivity.java | |
| parent | b7a84cf3cd81526f3396735e2134771a73cbb7a7 (diff) | |
| parent | 9ab45c5e28ff9b1dd993c8d28048016db86c6319 (diff) | |
| download | cgeo-c9e2182c6db930fb4794e20b7009b12051f9b108.zip cgeo-c9e2182c6db930fb4794e20b7009b12051f9b108.tar.gz cgeo-c9e2182c6db930fb4794e20b7009b12051f9b108.tar.bz2 | |
Merge branch 'remove-altitude' into upstream
Diffstat (limited to 'main/src/cgeo/geocaching/CacheDetailActivity.java')
| -rw-r--r-- | main/src/cgeo/geocaching/CacheDetailActivity.java | 19 |
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."); } } }; |
