Public transport fixes. Search crash fix.
This commit is contained in:
parent
84a2f5f923
commit
a213298a6f
5 changed files with 7 additions and 11 deletions
|
@ -858,8 +858,8 @@ public class SearchUICore {
|
|||
return cmp;
|
||||
}
|
||||
}
|
||||
int st1 = Algorithms.extractFirstIntegerNumber(o1.localeName);
|
||||
int st2 = Algorithms.extractFirstIntegerNumber(o2.localeName);
|
||||
int st1 = o1.localeName == null ? -10000 : Algorithms.extractFirstIntegerNumber(o1.localeName);
|
||||
int st2 = o2.localeName == null ? -10000 : Algorithms.extractFirstIntegerNumber(o2.localeName);
|
||||
if (st1 != st2) {
|
||||
return Algorithms.compare(st1, st2);
|
||||
}
|
||||
|
|
|
@ -714,19 +714,15 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener
|
|||
OnClickListener listener = new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
//MapActivity mapActivity = getMapActivity();
|
||||
//if (mapActivity != null) {
|
||||
MapActivity mapActivity = getMapActivity();
|
||||
if (mapActivity != null) {
|
||||
if (selected.size() > 0) {
|
||||
// OsmandApplication app = mapActivity.getMyApplication();
|
||||
ApplicationMode next = selected.iterator().next();
|
||||
// if (app.getRoutingHelper().isRouteCalculated()) {
|
||||
// app.getSettings().LAST_ROUTE_APPLICATION_MODE.set(next);
|
||||
// }
|
||||
updateApplicationMode(am, next);
|
||||
}
|
||||
updateFinishPointView();
|
||||
updateOptionsButtons();
|
||||
//}
|
||||
}
|
||||
}
|
||||
};
|
||||
final List<ApplicationMode> values = new ArrayList<ApplicationMode>(ApplicationMode.values(mapActivity.getMyApplication()));
|
||||
|
|
|
@ -23,7 +23,7 @@ import net.osmand.plus.wikipedia.WikipediaDialogFragment;
|
|||
|
||||
public class WarningCard extends BaseCard {
|
||||
|
||||
public static final String OSMAND_BLOG_LINK = "https://osmand.net/blog";
|
||||
public static final String OSMAND_BLOG_LINK = "https://osmand.net/blog/guideline-pt";
|
||||
|
||||
public WarningCard(MapActivity mapActivity) {
|
||||
super(mapActivity);
|
||||
|
|
|
@ -943,7 +943,6 @@ public class RoutingHelper {
|
|||
|
||||
public void recalculateRouteDueToSettingsChange() {
|
||||
clearCurrentRoute(finalLocation, intermediatePoints);
|
||||
getSettings().LAST_ROUTE_APPLICATION_MODE.set(getAppMode());
|
||||
if (isPublicTransportMode()) {
|
||||
Location start = lastFixedLocation;
|
||||
LatLon finish = finalLocation;
|
||||
|
|
|
@ -158,6 +158,7 @@ public class TransportRoutingHelper {
|
|||
private void startRouteCalculationThread(TransportRouteCalculationParams params) {
|
||||
synchronized (this) {
|
||||
final Thread prevRunningJob = currentRunningJob;
|
||||
app.getSettings().LAST_ROUTE_APPLICATION_MODE.set(routingHelper.getAppMode());
|
||||
RouteRecalculationThread newThread =
|
||||
new RouteRecalculationThread("Calculating public transport route", params);
|
||||
currentRunningJob = newThread;
|
||||
|
|
Loading…
Reference in a new issue