From 849f9b27defbefd0d0a347da1f26cc8e3730dcf6 Mon Sep 17 00:00:00 2001 From: Eugene Crosser Date: Sat, 25 Feb 2012 13:51:07 +0400 Subject: [PATCH] Make the 'elsewhere' entry work --- src/org/average/whereami/LastLocation.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/org/average/whereami/LastLocation.java b/src/org/average/whereami/LastLocation.java index 27c5c51..5899bf5 100644 --- a/src/org/average/whereami/LastLocation.java +++ b/src/org/average/whereami/LastLocation.java @@ -105,8 +105,9 @@ public final class LastLocation extends Oracle { Double.parseDouble(loc_lats[i]), Double.parseDouble(loc_lons[i])); Log.v(TAG, "Dist from " + loc_names[i] + - " is " + dist); - if ((loc_dists[i] == "0") || + " is " + dist + + ", threshold " + loc_dists[i]); + if ((loc_dists[i].equals("0")) || (dist < Double.parseDouble(loc_dists[i]))) { locmsg = loc_names[i]; break; -- 2.43.0