Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2016-06-02 00:41:50 +02:00
commit 4b755fe114
10 changed files with 261 additions and 1626 deletions

View file

@ -10,6 +10,8 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;
import net.osmand.PlatformUtil;
import net.osmand.binary.BinaryInspector;
@ -485,42 +487,46 @@ public class RouteResultPreparation {
}
if (!changed) {
TurnType tt = currentSegment.getTurnType();
boolean goForward = false;
if (tt.getValue() == TurnType.C && tt.getLanes() != null) {
for (int it = 0; it < tt.getLanes().length; it++) {
int turn = tt.getLanes()[it];
if (TurnType.getPrimaryTurn(turn) == TurnType.C ||
TurnType.getSecondaryTurn(turn) == TurnType.C ||
TurnType.getTertiaryTurn(turn) == TurnType.C) {
goForward = true;
break;
}
}
}
if(goForward) {
for (int it = 0; it < tt.getLanes().length; it++) {
int turn = tt.getLanes()[it];
if (TurnType.getPrimaryTurn(turn) != TurnType.C) {
if(TurnType.getSecondaryTurn(turn) == TurnType.C) {
int st = TurnType.getSecondaryTurn(turn);
TurnType.setSecondaryTurn(tt.getLanes(), it, TurnType.getPrimaryTurn(turn));
TurnType.setPrimaryTurn(tt.getLanes(), it, st);
} else if(TurnType.getTertiaryTurn(turn) == TurnType.C) {
int st = TurnType.getTertiaryTurn(turn);
TurnType.setTertiaryTurn(tt.getLanes(), it, TurnType.getPrimaryTurn(turn));
TurnType.setPrimaryTurn(tt.getLanes(), it, st);
} else {
tt.getLanes()[it] = turn & (~1);
}
}
}
}
inferActiveTurnLanesFromTurn(tt, TurnType.C);
}
nextSegment = currentSegment;
dist = 0;
}
}
}
private void inferActiveTurnLanesFromTurn(TurnType tt, int type) {
boolean found = false;
if (tt.getValue() == type && tt.getLanes() != null) {
for (int it = 0; it < tt.getLanes().length; it++) {
int turn = tt.getLanes()[it];
if (TurnType.getPrimaryTurn(turn) == type ||
TurnType.getSecondaryTurn(turn) == type ||
TurnType.getTertiaryTurn(turn) == type) {
found = true;
break;
}
}
}
if(found) {
for (int it = 0; it < tt.getLanes().length; it++) {
int turn = tt.getLanes()[it];
if (TurnType.getPrimaryTurn(turn) != type) {
if(TurnType.getSecondaryTurn(turn) == type) {
int st = TurnType.getSecondaryTurn(turn);
TurnType.setSecondaryTurn(tt.getLanes(), it, TurnType.getPrimaryTurn(turn));
TurnType.setPrimaryTurn(tt.getLanes(), it, st);
} else if(TurnType.getTertiaryTurn(turn) == type) {
int st = TurnType.getTertiaryTurn(turn);
TurnType.setTertiaryTurn(tt.getLanes(), it, TurnType.getPrimaryTurn(turn));
TurnType.setPrimaryTurn(tt.getLanes(), it, st);
} else {
tt.getLanes()[it] = turn & (~1);
}
}
}
}
}
private class MergeTurnLaneTurn {
TurnType turn;
@ -610,17 +616,36 @@ public class RouteResultPreparation {
}
TurnType currentTurn = currentSegment.getTurnType();
currentTurn.setLanes(active.disabledLanes);
// There is a test which fails that assumption and there is no contr-test how it could help here
// int turn = inferTurnFromLanes(active.disabledLanes);
// if (turn != 0 && turn != currentTurn.getValue()) {
// TurnType newTurnType = TurnType.valueOf(turn, leftSide);
// newTurnType.setLanes(active.disabledLanes);
// newTurnType.setSkipToSpeak(currentTurn.isSkipToSpeak());
// currentSegment.setTurnType(newTurnType);
// }
inferCommonActiveLane(currentTurn);
return true;
}
private void inferCommonActiveLane(TurnType currentTurn) {
int[] lanes = currentTurn.getLanes();
int singleTurn = 0;
for(int i = 0; i < lanes.length; i++) {
if(lanes[i] % 2 == 1 && TurnType.getSecondaryTurn(lanes[i]) == 0) {
singleTurn = TurnType.getPrimaryTurn(lanes[i]);
break;
}
}
if(singleTurn == 0) {
singleTurn = currentTurn.getValue();
}
for(int i = 0; i < lanes.length; i++) {
if(lanes[i] % 2 == 1 && TurnType.getPrimaryTurn(lanes[i]) != singleTurn) {
if(TurnType.getSecondaryTurn(lanes[i]) == singleTurn) {
TurnType.setSecondaryTurn(lanes, i, TurnType.getPrimaryTurn(lanes[i]));
TurnType.setPrimaryTurn(lanes, i, singleTurn);
} else if(TurnType.getTertiaryTurn(lanes[i]) == singleTurn) {
TurnType.setTertiaryTurn(lanes, i, TurnType.getPrimaryTurn(lanes[i]));
TurnType.setPrimaryTurn(lanes, i, singleTurn);
}
}
}
}
private static final int MAX_SPEAK_PRIORITY = 5;
private int highwaySpeakPriority(String highway) {
if(highway == null || highway.endsWith("track") || highway.endsWith("services") || highway.endsWith("service")
@ -795,7 +820,9 @@ public class RouteResultPreparation {
boolean keepLeft = false;
boolean keepRight = false;
boolean speak = false;
List<int[]> leftLanesInfo = new ArrayList<int[]>();
int leftLanes = 0;
List<int[]> rightLanesInfo = new ArrayList<int[]>();
int rightLanes = 0;
int roadsOnLeft = 0;
int addRoadsOnLeft = 0;
@ -837,9 +864,9 @@ public class RouteResultPreparation {
if (rs.keepLeft || rs.keepRight) {
String[] splitLaneOptions = turnLanes.split("\\|", -1);
int activeBeginIndex = findActiveIndex(rawLanes, splitLaneOptions, rs.leftLanes, true,
rs.roadsOnLeft, rs.addRoadsOnLeft);
rs.leftLanesInfo, rs.roadsOnLeft, rs.addRoadsOnLeft);
int activeEndIndex = findActiveIndex(rawLanes, splitLaneOptions, rs.rightLanes, false,
rs.roadsOnRight, rs.addRoadsOnRight);
rs.rightLanesInfo, rs.roadsOnRight, rs.addRoadsOnRight);
if (activeBeginIndex == -1 || activeEndIndex == -1 || activeBeginIndex > activeEndIndex) {
// something went wrong
return createSimpleKeepLeftRightTurn(leftSide, prevSegm, currentSegm, rs);
@ -859,12 +886,12 @@ public class RouteResultPreparation {
int sturn = TurnType.getSecondaryTurn(rawLanes[k]);
boolean active = false;
if (turn == TurnType.C) {
active = true;
if ((TurnType.isRightTurn(sturn) && rs.roadsOnRight == 0)
|| (TurnType.isLeftTurn(sturn) && rs.roadsOnLeft == 0)) {
TurnType.setPrimaryTurn(rawLanes, k, sturn);
TurnType.setSecondaryTurn(rawLanes, k, turn);
}
active = true;
} else if (TurnType.isRightTurn(turn) && rs.roadsOnRight == 0) {
// some turns go through many segments (to turn right or left)
// so on one first segment the lane could be available and may be only 1 possible
@ -887,26 +914,48 @@ public class RouteResultPreparation {
}
protected int findActiveIndex(int[] rawLanes, String[] splitLaneOptions, int lanes, boolean left,
int roads, int addRoads) {
List<int[]> lanesInfo, int roads, int addRoads) {
int activeStartIndex = -1;
boolean lookupSlightTurn = addRoads > 0;
Set<String> addedTurns = new TreeSet<String>();
// if we have information increase number of roads per each turn direction
int diffTurnRoads = roads;
for(int[] li : lanesInfo) {
TIntHashSet set = new TIntHashSet();
if(li != null) {
for(int k = 0; k < li.length; k++) {
TurnType.collectTurnTypes(li[k], set);
}
}
diffTurnRoads += Math.max(set.size() - 1, 0);
}
for (int i = 0; i < rawLanes.length; i++) {
int ind = left ? i : (rawLanes.length - i - 1);
if (!lookupSlightTurn ||
TurnType.isSlightTurn(TurnType.getPrimaryTurn(rawLanes[ind]))
|| TurnType.isSlightTurn(TurnType.getSecondaryTurn(rawLanes[ind]))) {
int cnt = countOccurrences(splitLaneOptions[ind], ';') + 1;
if(cnt > 1) {
// sometimes slight right turn goes to the road with 2 lanes
// the better situation to group all the lanes and
// when ';' we know for sure the lane combines 2 group
roads --;
String[] laneTurns = splitLaneOptions[ind].split(";");
int cnt = 0;
for(String lTurn : laneTurns) {
boolean added = addedTurns.add(lTurn);
if(added) {
cnt++;
diffTurnRoads --;
}
}
// int cnt = countOccurrences(splitLaneOptions[ind], ';') + 1;
// if(cnt > 1) {
// // sometimes slight right turn goes to the road with 2 lanes
// // the better situation to group all the lanes and
// // when ';' we know for sure the lane combines 2 group
// roads --;
// }
lanes -= cnt;
// we already found slight turn others are turn in different direction
lookupSlightTurn = false;
}
if (lanes < 0 || roads < 0) {
if (lanes < 0 || diffTurnRoads < 0) {
activeStartIndex = ind;
break;
}
@ -923,6 +972,7 @@ public class RouteResultPreparation {
double mpi = Math.abs(MapUtils.degreesDiff(prevSegm.getBearingEnd(), attached.getBearingBegin()));
int rsSpeakPriority = highwaySpeakPriority(attached.getObject().getHighway());
int lanes = countLanesMinOne(attached);
int[] turnLanes = parseTurnLanes(attached.getObject(), attached.getBearingBegin());
boolean smallStraightVariation = mpi < TURN_DEGREE_MIN;
boolean smallTargetVariation = Math.abs(ex) < TURN_DEGREE_MIN;
boolean attachedOnTheRight = ex >= 0;
@ -936,9 +986,15 @@ public class RouteResultPreparation {
if (attachedOnTheRight) {
rs.keepLeft = true;
rs.rightLanes += lanes;
if(turnLanes != null) {
rs.rightLanesInfo.add(turnLanes);
}
} else {
rs.keepRight = true;
rs.leftLanes += lanes;
if(turnLanes != null) {
rs.leftLanesInfo.add(turnLanes);
}
}
rs.speak = rs.speak || rsSpeakPriority <= speakPriority;
} else {

View file

@ -1,5 +1,7 @@
package net.osmand.router;
import gnu.trove.set.hash.TIntHashSet;
public class TurnType {
public static final int C = 1;//"C"; // continue (go straight) //$NON-NLS-1$
public static final int TL = 2; // turn left //$NON-NLS-1$
@ -215,7 +217,33 @@ public class TurnType {
return (laneValue >> 10);
}
public static String toString(int[] lns) {
String s = "";
for (int h = 0; h < lns.length; h++) {
if (h > 0) {
s += "|";
}
if (lns[h] % 2 == 1) {
s += "+";
}
int pt = TurnType.getPrimaryTurn(lns[h]);
if (pt == 0) {
pt = 1;
}
s += TurnType.valueOf(pt, false).toXmlString();
int st = TurnType.getSecondaryTurn(lns[h]);
if (st != 0) {
s += "," + TurnType.valueOf(st, false).toXmlString();
}
int tt = TurnType.getTertiaryTurn(lns[h]);
if (tt != 0) {
s += "," + TurnType.valueOf(tt, false).toXmlString();
}
}
s += "";
return s;
}
public int[] getLanes() {
return lanes;
}
@ -291,4 +319,21 @@ public class TurnType {
public static boolean isSlightTurn(int type) {
return type == TSLL || type == TSLR || type == C || type == KL || type == KR;
}
public static void collectTurnTypes(int lane, TIntHashSet set) {
int pt = TurnType.getPrimaryTurn(lane);
if(pt != 0) {
set.add(pt);
}
pt = TurnType.getSecondaryTurn(lane);
if(pt != 0) {
set.add(pt);
}
pt = TurnType.getTertiaryTurn(lane);
if(pt != 0) {
set.add(pt);
}
}
}

View file

@ -132,31 +132,7 @@ public class RouteResultPreparationTest {
private String getLanesString(RouteSegmentResult segment) {
final int[] lns = segment.getTurnType().getLanes();
if (lns != null) {
String s = "";
for (int h = 0; h < lns.length; h++) {
if (h > 0) {
s += "|";
}
if (lns[h] % 2 == 1) {
s += "+";
}
int pt = TurnType.getPrimaryTurn(lns[h]);
if (pt == 0) {
pt = 1;
}
s += TurnType.valueOf(pt, false).toXmlString();
int st = TurnType.getSecondaryTurn(lns[h]);
if (st != 0) {
s += "," + TurnType.valueOf(st, false).toXmlString();
}
int tt = TurnType.getTertiaryTurn(lns[h]);
if (tt != 0) {
s += "," + TurnType.valueOf(tt, false).toXmlString();
}
}
s += "";
return s;
return TurnType.toString(lns);
}
return null;
}

View file

@ -44,7 +44,7 @@
}
},
{
"testName": "2.Valley View Lane TU Highway 161 Service Road",
"testName": "2. Valley View Lane TU Highway 161 Service Road",
"startPoint": {
"latitude": 45.694859388262195,
"longitude": 35.467755138874054
@ -58,7 +58,39 @@
}
},
{
"testName": "2.1.Highway 161 Service Road to Lyndon B Johnson Freeway (I 635) link",
"testName": "2.1 Valley View Lane C Highway 161 Service Road",
"startPoint": {
"latitude": 45.694859388262195,
"longitude": 35.467755138874054
},
"endPoint": {
"latitude": 45.692210341270474,
"longitude": 35.462753385305405
},
"expectedResults": {
"26705": "TU|TL|+C,TL|C|C,TR",
"26897": "TL|+C,TL|C|C,TR",
"26739": "TL|+C,TL|C|C"
}
},
{
"testName": "2.2 Valley View Lane TL Highway 161 Service Road",
"startPoint": {
"latitude": 45.694859388262195,
"longitude": 35.467755138874054
},
"endPoint": {
"latitude": 45.69354592206,
"longitude": 35.46670215889
},
"expectedResults": {
"26705": "TU|+TL|+TL,C|C|C,TR",
"26897": "+TL|+TL,C|C|C,TR",
"26605": "TL:+TL|+TL,C|C|C"
}
},
{
"testName": "2.3. Highway 161 Service Road to Lyndon B Johnson Freeway (I 635) link",
"startPoint": {
"latitude": 45.69384114913531,
"longitude": 35.46754793822765
@ -74,7 +106,7 @@
}
},
{
"testName": "3.Motorway link from Ringweg Zuid TL Amstelveenseweg",
"testName": "3. Motorway link from Ringweg Zuid TL Amstelveenseweg",
"startPoint": {
"latitude": 45.6971206184178,
"longitude": 35.51630312204361

File diff suppressed because it is too large Load diff

View file

@ -965,8 +965,8 @@ Für Hilfe mit der OsmAnd-App kontaktieren Sie bitte unser Support-Team unter su
<string name="route_updated_loc_found">Route wird neu berechnet sobald Standort ermittelt</string>
<string name="continue_follow_previous_route_auto">Vorherige Navigation wurde nicht beendet. Der Route weiter folgen? (%1$s Sekunden)</string>
<string name="show_cameras">Radarfallen anzeigen</string>
<string name="show_traffic_warnings">Verkehrswarnungen anzeigen</string>
<string name="show_cameras">Radarfallen</string>
<string name="show_traffic_warnings">Verkehrswarnungen</string>
<string name="avoid_toll_roads">Mautstraßen vermeiden</string>
<string name="map_widget_top_text">Straßenname</string>
<string name="map_widget_config">Konfiguration</string>
@ -996,7 +996,7 @@ Für Hilfe mit der OsmAnd-App kontaktieren Sie bitte unser Support-Team unter su
<string name="map_widget_renderer">Kartendarstellung</string>
<string name="layer_map_appearance">Anzeige konfigurieren</string>
<string name="show_lanes">Fahrspuren anzeigen</string>
<string name="show_lanes">Fahrspuren</string>
<string name="avoid_unpaved">Vermeide unbefestigte Straßen</string>
<string name="avoid_ferries">Vermeide Fähren</string>
<string name="avoid_in_routing_title">Vermeide …</string>
@ -1608,8 +1608,8 @@ Für Hilfe mit der OsmAnd-App kontaktieren Sie bitte unser Support-Team unter su
<string name="rendering_value_highContrastRoads_name">Kontrastreiche Straßen</string>
<string name="traffic_warning_railways">Bahnübergang</string>
<string name="traffic_warning_pedestrian">Fußgängerübergang</string>
<string name="show_railway_warnings">Eisenbahnübergänge anzeigen</string>
<string name="show_pedestrian_warnings">Fußgängerübergänge anzeigen</string>
<string name="show_railway_warnings">Eisenbahnübergänge</string>
<string name="show_pedestrian_warnings">Fußgängerübergänge</string>
<string name="rendering_value_americanRoadAtlas_name">Amerikanischer Straßenatlas</string>
<string name="routing_attr_no_new_routing_name">Routing-Regeln v1.9 nicht verwenden</string>
<string name="routing_attr_no_new_routing_description">Neuen Routenalgorithmus aus v1.9 nicht verwenden</string>

View file

@ -12,8 +12,10 @@
<string name="shared_string_favorites">Favourites</string>
<string name="shared_string_add_to_favorites">Add to Favourites</string>
<string name="shared_string_my_favorites">My Favourites</string>
<string name="traffic_warning_railways">Railway crossing</string>
<string name="traffic_warning_pedestrian">Pedestrian crossing</string>
<string name="show_pedestrian_warnings">Show pedestrian crossings</string>
<string name="show_railway_warnings">Railway crossings</string>
<string name="show_pedestrian_warnings">Pedestrian crossings</string>
<string name="rendering_attr_subwayMode_name">Underground routes</string>
<string name="fav_point_emoticons_message">The favourite point name has been modified to %1$s to facilitate properly saving the string with emoticons to a file.</string>
<string name="fav_point_dublicate">Favourite point name duplicate</string>
@ -43,4 +45,13 @@
<string name="favourites_context_menu_delete">Delete favourite</string>
<string name="favourites_remove_dialog_msg">Delete favourite point \'%s\'?</string>
<string name="favourites_remove_dialog_success">Favourite point {0} was successfully deleted.</string>
<string name="osmo_center_location">Centre on the screen</string>
<string name="always_center_position_on_map">Display position always in centre</string>
<string name="choose_auto_follow_route">Auto-centre map view</string>
<string name="auto_follow_route_navigation">Auto-centre nav only</string>
<string name="auto_follow_route_navigation_descr">Auto-centre map view only while navigating.</string>
<string name="auto_follow_location_enabled">Auto-centre map view in use.</string>
<string name="search_position_map_view">Current map centre</string>
<string name="search_near_map">Search near current map centre</string>
<string name="position_on_map_center">Centre</string>
</resources>

View file

@ -285,8 +285,8 @@
<string name="srtm_plugin_disabled">Contour lines disabled</string>
<string name="favorite_category_add_new">Add new</string>
<string name="favorite_category_select">Select category</string>
<string name="default_speed_system_descr">Define speed measurement system</string>
<string name="default_speed_system">Speed measurement</string>
<string name="default_speed_system_descr">Define unit of speed</string>
<string name="default_speed_system">Unit of speed</string>
<string name="nm">nmi</string>
<string name="si_nm">Nautical miles</string>
<string name="si_kmh">Kilometers per hour</string>
@ -609,8 +609,8 @@
<string name="rendering_value_highContrastRoads_name">High contrast roads</string>
<string name="traffic_warning_railways">Railroad crossing</string>
<string name="traffic_warning_pedestrian">Pedestrian crosswalk</string>
<string name="show_railway_warnings">Show railroad crossings</string>
<string name="show_pedestrian_warnings">Show pedestrian crosswalks</string>
<string name="show_railway_warnings">Railroad crossings</string>
<string name="show_pedestrian_warnings">Pedestrian crosswalks</string>
<string name="rendering_value_americanRoadAtlas_name">American road atlas</string>
<string name="routing_attr_no_new_routing_name">No v1.9 routing rules</string>
<string name="routing_attr_no_new_routing_description">Do not use routing rules introduced in v1.9</string>
@ -1213,7 +1213,7 @@
<string name="poi_filter_food_shop">Food shop</string>
<string name="poi_filter_for_tourists">For tourists</string>
<string name="poi_filter_fuel">Fuel</string>
<string name="show_warnings_title">Show alarms…</string>
<string name="show_warnings_title">Show alerts…</string>
<string name="show_warnings_descr">Configure traffic warnings (speed limits, forced stops, speed bumps), speed camera warnings, and lane information</string>
<string name="use_compass_navigation_descr">Use the compass when no heading is detected otherwise</string>
<string name="use_compass_navigation">Use compass</string>
@ -1471,7 +1471,7 @@ If you need help with OsmAnd application, please contact our support team: suppo
<string name="day_night_info">Day/night info</string>
<string name="map_widget_renderer">Map style</string>
<string name="layer_map_appearance">Configure screen</string>
<string name="show_lanes">Show lanes</string>
<string name="show_lanes">Lanes</string>
<string name="avoid_unpaved">Avoid unpaved roads</string>
<string name="avoid_ferries">Avoid ferries</string>
<string name="avoid_in_routing_title">Avoid…</string>
@ -1505,8 +1505,8 @@ If you need help with OsmAnd application, please contact our support team: suppo
<string name="bg_service_screen_unlock">Unlock screen</string>
<string name="bg_service_screen_lock_toast">The screen is locked</string>
<string name="bg_service_interval">Set wake-up interval:</string>
<string name="show_cameras">Show speed cameras</string>
<string name="show_traffic_warnings">Show traffic warnings</string>
<string name="show_cameras">Speed cameras</string>
<string name="show_traffic_warnings">Traffic warnings</string>
<string name="avoid_toll_roads">Avoid toll roads</string>
<string name="continue_follow_previous_route_auto">Previous navigation was unfinished. Continue following it? (%1$s seconds)</string>
<string name="route_updated_loc_found">Route will be calculated once position is found</string>
@ -1841,8 +1841,8 @@ If you need help with OsmAnd application, please contact our support team: suppo
<string name="preferred_locale_descr">Select display language (please restart OsmAnd after changing)</string>
<string name="preferred_locale">Display language</string>
<string name="incomplete_locale">incomplete</string>
<string name="unit_of_length_descr">Change units of length and speed</string>
<string name="unit_of_length">Unit of measure</string>
<string name="unit_of_length_descr">Change units of length</string>
<string name="unit_of_length">Unit of length</string>
<string name="si_mi_foots">Miles/feet</string>
<string name="si_mi_yard">Miles/yards</string>
<string name="si_km_m">Kilometers/meters</string>

View file

@ -1,50 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<ListPreference android:title="@string/router_service" android:key="router_service" android:summary="@string/router_service_descr" />
<PreferenceCategory android:key="routing_preferences" android:title="@string/routing_preferences_descr">
<CheckBoxPreference android:summary="@string/fast_route_mode_descr" android:title="@string/fast_route_mode"
<ListPreference android:title="@string/router_service" android:key="router_service" android:summary="@string/router_service_descr" />
<PreferenceCategory android:key="routing_preferences" android:title="@string/routing_preferences_descr">
<CheckBoxPreference android:summary="@string/fast_route_mode_descr" android:title="@string/fast_route_mode"
android:key="fast_route_mode" />
<Preference android:title="@string/avoid_in_routing_title" android:summary="@string/avoid_in_routing_descr" android:key="avoid_in_routing"/>
<Preference android:title="@string/prefer_in_routing_title" android:summary="@string/prefer_in_routing_descr" android:key="prefer_in_routing"/>
</PreferenceCategory>
<PreferenceCategory android:key="guidance_preferences" android:title="@string/guidance_preferences_descr">
<ListPreference android:key="auto_follow_route" android:title="@string/choose_auto_follow_route"
android:summary="@string/choose_auto_follow_route_descr" />
<ListPreference android:key="auto_zoom_map_new" android:title="@string/auto_zoom_map"
android:summary="@string/auto_zoom_map_descr" />
<CheckBoxPreference android:title="@string/snap_to_road" android:summary="@string/snap_to_road_descr" android:key="snap_to_road" />
<Preference android:title="@string/show_warnings_title" android:summary="@string/show_warnings_descr" android:key="show_routing_alarms"/>
<Preference android:title="@string/speak_title" android:summary="@string/speak_descr" android:key="speak_routing_alarms"/>
<ListPreference
android:key="keep_informing"
android:title="@string/keep_informing"
android:summary="@string/keep_informing_descr" />
<ListPreference
android:key="arrival_distance_factor"
android:title="@string/arrival_distance"
android:summary="@string/arrival_distance_descr" />
<ListPreference
android:key="default_speed_system"
android:title="@string/default_speed_system"
android:summary="@string/default_speed_system_descr" />
<ListPreference
android:key="speed_limit_exceed"
android:title="@string/speed_limit_exceed"
android:summary="@string/speed_limit_exceed_message"/>
<!--
<CheckBoxPreference android:title="@string/show_zoom_buttons_navigation" android:summary="@string/show_zoom_buttons_navigation_descr" android:key="show_zoom_buttons_navigation" />
-->
<ListPreference
android:key="wake_on_voice_int"
android:title="@string/wake_on_voice"
android:summary="@string/wake_on_voice_descr" />
<!--
<ListPreference
android:key="delay_to_start_navigation"
android:title="@string/delay_to_start_navigation"
android:summary="@string/delay_to_start_navigation_descr" />
-->
</PreferenceCategory>
<Preference android:title="@string/avoid_in_routing_title" android:summary="@string/avoid_in_routing_descr" android:key="avoid_in_routing"/>
<Preference android:title="@string/prefer_in_routing_title" android:summary="@string/prefer_in_routing_descr" android:key="prefer_in_routing"/>
</PreferenceCategory>
<PreferenceCategory android:key="guidance_preferences" android:title="@string/guidance_preferences_descr">
<ListPreference android:key="auto_follow_route" android:title="@string/choose_auto_follow_route"
android:summary="@string/choose_auto_follow_route_descr" />
<ListPreference android:key="auto_zoom_map_new" android:title="@string/auto_zoom_map"
android:summary="@string/auto_zoom_map_descr" />
<CheckBoxPreference android:title="@string/snap_to_road" android:summary="@string/snap_to_road_descr" android:key="snap_to_road" />
<Preference android:title="@string/show_warnings_title" android:summary="@string/show_warnings_descr" android:key="show_routing_alarms"/>
<Preference android:title="@string/speak_title" android:summary="@string/speak_descr" android:key="speak_routing_alarms"/>
<ListPreference
android:key="keep_informing"
android:title="@string/keep_informing"
android:summary="@string/keep_informing_descr" />
<ListPreference
android:key="arrival_distance_factor"
android:title="@string/arrival_distance"
android:summary="@string/arrival_distance_descr" />
<ListPreference
android:key="default_speed_system"
android:title="@string/default_speed_system"
android:summary="@string/default_speed_system_descr" />
<ListPreference
android:key="speed_limit_exceed"
android:title="@string/speed_limit_exceed"
android:summary="@string/speed_limit_exceed_message"/>
<!--
<CheckBoxPreference android:title="@string/show_zoom_buttons_navigation" android:summary="@string/show_zoom_buttons_navigation_descr" android:key="show_zoom_buttons_navigation" />
-->
<ListPreference
android:key="wake_on_voice_int"
android:title="@string/wake_on_voice"
android:summary="@string/wake_on_voice_descr" />
<!--
<ListPreference
android:key="delay_to_start_navigation"
android:title="@string/delay_to_start_navigation"
android:summary="@string/delay_to_start_navigation_descr" />
-->
</PreferenceCategory>
</PreferenceScreen>

View file

@ -617,6 +617,7 @@ public class VoiceRouter {
pn = pn.replace('-', ' ');
pn = pn.replace(':', ' ');
pn = pn.replace(";", ", "); // Trailing blank prevents punctuation being pronounced. Replace by comma for better intonation.
pn = pn.replace("/", ", "); // Slash is actually pronounced by many TTS engines, ceeating an awkward voice prompt, better replace by comma.
if ((player != null) && (!"de".equals(player.getLanguage()))) {
pn = pn.replace("\u00df", "ss"); // Helps non-German tts voices to pronounce German Strasse (=street)
}