diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2014-05-24 05:41:58 +0200 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2014-05-24 05:41:58 +0200 |
| commit | 04f68f25f8f5174fbdb4c2656ece766abb3e6c1c (patch) | |
| tree | 154a8ce432e45a4ac8095b8d456510560f0e01eb /main/src | |
| parent | a6dbdfbf1a75aaf0e7496dda12562767b3c599a1 (diff) | |
| download | cgeo-04f68f25f8f5174fbdb4c2656ece766abb3e6c1c.zip cgeo-04f68f25f8f5174fbdb4c2656ece766abb3e6c1c.tar.gz cgeo-04f68f25f8f5174fbdb4c2656ece766abb3e6c1c.tar.bz2 | |
multiple lint and compiler warning fixes
Diffstat (limited to 'main/src')
| -rw-r--r-- | main/src/cgeo/geocaching/LogTrackableActivity.java | 1 | ||||
| -rw-r--r-- | main/src/cgeo/geocaching/geopoint/Units.java | 7 |
2 files changed, 4 insertions, 4 deletions
diff --git a/main/src/cgeo/geocaching/LogTrackableActivity.java b/main/src/cgeo/geocaching/LogTrackableActivity.java index e1ca612..9f1bc88 100644 --- a/main/src/cgeo/geocaching/LogTrackableActivity.java +++ b/main/src/cgeo/geocaching/LogTrackableActivity.java @@ -20,7 +20,6 @@ import cgeo.geocaching.utils.LogTemplateProvider.LogContext; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; -import android.app.Dialog; import android.app.ProgressDialog; import android.content.Context; import android.content.Intent; diff --git a/main/src/cgeo/geocaching/geopoint/Units.java b/main/src/cgeo/geocaching/geopoint/Units.java index 4d11a3b..d00e075 100644 --- a/main/src/cgeo/geocaching/geopoint/Units.java +++ b/main/src/cgeo/geocaching/geopoint/Units.java @@ -4,6 +4,8 @@ import cgeo.geocaching.settings.Settings; import org.apache.commons.lang3.tuple.ImmutablePair; +import java.util.Locale; + public class Units { public static ImmutablePair<Double, String> scaleDistance(final double distanceKilometers) { @@ -53,9 +55,8 @@ public class Units { public static String getSpeed(final float kilometersPerHour) { if (Settings.isUseImperialUnits()) { - return String.format("%.0f mph", kilometersPerHour / IConversion.MILES_TO_KILOMETER); - } else { - return String.format("%.0f km/h", kilometersPerHour); + return String.format(Locale.US, "%.0f mph", kilometersPerHour / IConversion.MILES_TO_KILOMETER); } + return String.format(Locale.US, "%.0f km/h", kilometersPerHour); } } |
