From 3af82c0c47b3c7483d61adc30a046d5d8ab5b94b Mon Sep 17 00:00:00 2001 From: PavelRatushny Date: Tue, 23 May 2017 14:09:06 +0300 Subject: [PATCH] Fix #3750 --- .../osmand/plus/download/DownloadIndexesThread.java | 9 --------- .../src/net/osmand/plus/routing/RoutingHelper.java | 12 +++++++----- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadIndexesThread.java b/OsmAnd/src/net/osmand/plus/download/DownloadIndexesThread.java index 3c91072ad4..3dc4b64116 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadIndexesThread.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadIndexesThread.java @@ -437,15 +437,6 @@ public class DownloadIndexesThread { } else { dbHelper.update(entry, DatabaseHelper.DOWNLOAD_ENTRY); } - } else if (o instanceof String) { - String message = (String) o; - // ctx.getString(R.string.shared_string_io_error) +": Interrupted"; - if (!message.toLowerCase().contains("interrupted")) { - if (uiActivity == null || - !message.equals(app.getString(R.string.shared_string_download_successful))) { - app.showToastMessage(message); - } - } } } downloadInProgress(); diff --git a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java index 53fd9bae8f..ce29dc1f93 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java +++ b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java @@ -677,12 +677,14 @@ public class RoutingHelper { } } if (showToast.value) { - String msg = app.getString(R.string.new_route_calculated_dist) + ": " - + OsmAndFormatter.getFormattedDistance(res.getWholeDistance(), app); - if (OsmandPlugin.isDevelopment() && res.getRoutingTime() != 0f) { - msg += " (" + Algorithms.formatDuration((int) res.getRoutingTime(), app.accessibilityEnabled()) + ")"; + if (OsmandPlugin.isDevelopment()) { + String msg = app.getString(R.string.new_route_calculated_dist) + ": " + + OsmAndFormatter.getFormattedDistance(res.getWholeDistance(), app); + if (res.getRoutingTime() != 0f) { + msg += " (" + Algorithms.formatDuration((int) res.getRoutingTime(), app.accessibilityEnabled()) + ")"; + } + app.showToastMessage(msg); } - app.showToastMessage(msg); } } });