diff --git a/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java b/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java index 9c78c2270a..34bc04ff07 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java @@ -682,27 +682,30 @@ public class WaypointHelper { } else if(((AlarmInfo) point).getType().toString() == "BORDER_CONTROL") { R.drawable.mx_barrier_border_control; } else if(((AlarmInfo) point).getType().toString() == "RAILWAY") { - if(app.getSettings.DRIVING_REGION.get().americanSigns){ - return R.drawable.list_warnings_railways_us; - } else { + //this produces error: non-static variable app cannot be referenced from a static context + //if(app.getSettings.DRIVING_REGION.get().americanSigns){ + // return R.drawable.list_warnings_railways_us; + //} else { return R.drawable.list_warnings_railways; - } + //} } else if(((AlarmInfo) point).getType().toString() == "TRAFFIC_CALMING") { - if(app.getSettings.DRIVING_REGION.get().americanSigns){ - return R.drawable.list_traffic_calming_us; - } else { + //this produces error: non-static variable app cannot be referenced from a static context + //if(app.getSettings.DRIVING_REGION.get().americanSigns){ + // return R.drawable.list_traffic_calming_us; + //} else { return R.drawable.list_traffic_calming; - } + //} } else if(((AlarmInfo) point).getType().toString() == "TOLL_BOOTH") { return R.drawable.mx_barrier_toll_booth; } else if(((AlarmInfo) point).getType().toString() == "STOP") { return R.drawable.list_stop; } else if(((AlarmInfo) point).getType().toString() == "PEDESTRIAN") { - if(app.getSettings.DRIVING_REGION.get().americanSigns){ - return R.drawable.list_warnings_pedestrian_us; - } else { + //this produces error: non-static variable app cannot be referenced from a static context + //if(app.getSettings.DRIVING_REGION.get().americanSigns){ + // return R.drawable.list_warnings_pedestrian_us; + //} else { return R.drawable.list_warnings_pedestrian; - } + //} } else { return 0; } @@ -738,27 +741,30 @@ public class WaypointHelper { } else if(((AlarmInfo) point).getType().toString() == "BORDER_CONTROL") { return uiCtx.getResources().getDrawable(R.drawable.mx_barrier_border_control); } else if(((AlarmInfo) point).getType().toString() == "RAILWAY") { - if(app.getSettings.DRIVING_REGION.get().americanSigns){ - return uiCtx.getResources().getDrawable(R.drawable.list_warnings_railways_us); - } else { + //this produces error: non-static variable app cannot be referenced from a static context + //if(app.getSettings.DRIVING_REGION.get().americanSigns){ + // return uiCtx.getResources().getDrawable(R.drawable.list_warnings_railways_us); + //} else { return uiCtx.getResources().getDrawable(R.drawable.list_warnings_railways); - } + //} } else if(((AlarmInfo) point).getType().toString() == "TRAFFIC_CALMING") { - if(app.getSettings.DRIVING_REGION.get().americanSigns){ - return uiCtx.getResources().getDrawable(R.drawable.list_traffic_calming_us); - } else { + //this produces error: non-static variable app cannot be referenced from a static context + //if(app.getSettings.DRIVING_REGION.get().americanSigns){ + // return uiCtx.getResources().getDrawable(R.drawable.list_traffic_calming_us); + //} else { return uiCtx.getResources().getDrawable(R.drawable.list_traffic_calming); - } + //} } else if(((AlarmInfo) point).getType().toString() == "TOLL_BOOTH") { return uiCtx.getResources().getDrawable(R.drawable.mx_barrier_toll_booth); } else if(((AlarmInfo) point).getType().toString() == "STOP") { return uiCtx.getResources().getDrawable(R.drawable.list_stop); } else if(((AlarmInfo) point).getType().toString() == "PEDESTRIAN") { - if(app.getSettings.DRIVING_REGION.get().americanSigns){ - return uiCtx.getResources().getDrawable(R.drawable.list_warnings_pedestrian_us); - } else { + //this produces error: non-static variable app cannot be referenced from a static context + //if(app.getSettings.DRIVING_REGION.get().americanSigns){ + // return uiCtx.getResources().getDrawable(R.drawable.list_warnings_pedestrian_us); + //} else { return uiCtx.getResources().getDrawable(R.drawable.list_warnings_pedestrian); - } + //} } else { return null; }