Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2014-12-20 20:21:09 +01:00
commit e121f221bb

View file

@ -702,6 +702,7 @@ public class RouteInfoWidgetsFactory {
public boolean updateInfo(DrawSettings drawSettings) {
boolean trafficWarnings = settings.SHOW_TRAFFIC_WARNINGS.get();
boolean cams = settings.SHOW_CAMERAS.get();
boolean peds = settings.SHOW_PEDESTRIAN.get();
boolean visible = false;
boolean eval = rh.isFollowingMode() || trackingUtilities.isMapLinkedToLocation();
if ((trafficWarnings || cams) && eval) {
@ -722,19 +723,20 @@ public class RouteInfoWidgetsFactory {
int textDy = 0;
String text = null;
if(alarm.getType() == AlarmInfoType.SPEED_LIMIT) {
text = alarm.getIntValue() +"";
if(settings.DRIVING_REGION.get().americanSigns){
locimgId = R.drawable.warnings_speed_limit_us;
textDy = (int) (-12 * scaleCoefficient);
//else case is done by drawing red ring
}
text = alarm.getIntValue() +"";
} else if(alarm.getType() == AlarmInfoType.SPEED_CAMERA) {
locimgId = R.drawable.warnings_speed_camera;
text = "";
} else if(alarm.getType() == AlarmInfoType.BORDER_CONTROL) {
locimgId = R.drawable.warnings_border_control;
text = "";
//text = "CLO";
} else if(alarm.getType() == AlarmInfoType.TOLL_BOOTH) {
//image done by drawing red ring
text = "$";
} else if(alarm.getType() == AlarmInfoType.TRAFFIC_CALMING) {
if(settings.DRIVING_REGION.get().americanSigns){
@ -746,21 +748,22 @@ public class RouteInfoWidgetsFactory {
} else if(alarm.getType() == AlarmInfoType.STOP) {
locimgId = R.drawable.warnings_stop;
text = "";
//text = "STOP";
} else if(alarm.getType() == AlarmInfoType.RAILWAY) {
if(settings.DRIVING_REGION.get().americanSigns){
locimgId = R.drawable.warnings_railways_us;
} else {
locimgId = R.drawable.warnings_railways;
}
} else if(alarm.getType() == AlarmInfoType.PEDESTRIAN) {
text = "";
} else if((alarm.getType() == AlarmInfoType.PEDESTRIAN) && peds) {
if(settings.DRIVING_REGION.get().americanSigns){
locimgId = R.drawable.warnings_pedestrian_us;
} else {
locimgId = R.drawable.warnings_pedestrian;
}
text = "";
}
visible = (text != null && text.length() > 0) || locimgId != 0;
visible = (text != null && text.length() > 0) || (locimgId != 0);
if (visible) {
if (alarm.getType() == AlarmInfoType.SPEED_CAMERA) {
visible = cams;