From bb76498c87c48bf5ff5c54a489ff8a936ff60ce6 Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Mon, 7 Mar 2016 20:18:41 -0300 Subject: [PATCH] Navitia: Take the location priority into account when suggesting locations. --- enabler/src/de/schildbach/pte/AbstractNavitiaProvider.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/enabler/src/de/schildbach/pte/AbstractNavitiaProvider.java b/enabler/src/de/schildbach/pte/AbstractNavitiaProvider.java index b5cbcda5..992ee997 100644 --- a/enabler/src/de/schildbach/pte/AbstractNavitiaProvider.java +++ b/enabler/src/de/schildbach/pte/AbstractNavitiaProvider.java @@ -993,10 +993,11 @@ public abstract class AbstractNavitiaProvider extends AbstractNetworkProvider for (int i = 0; i < places.length(); ++i) { final JSONObject place = places.getJSONObject(i); + final int priority = place.optInt("quality", 0); // Add location to station list. final Location location = parseLocation(place); - locations.add(new SuggestedLocation(location)); + locations.add(new SuggestedLocation(location, priority)); } }