From: Eugene Crosser Date: Sat, 25 Feb 2012 09:51:07 +0000 (+0400) Subject: Make the 'elsewhere' entry work X-Git-Url: http://average.org/gitweb/?a=commitdiff_plain;h=849f9b27defbefd0d0a347da1f26cc8e3730dcf6;p=WhereAmI.git Make the 'elsewhere' entry work --- 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;