Hafas: Use setters for non-standard character encodings, rather than the constructor parameter.

This commit is contained in:
Andreas Schildbach 2015-09-04 16:54:09 +02:00
parent 27f60db22b
commit 10d04bcb39
16 changed files with 53 additions and 26 deletions

View file

@ -98,9 +98,9 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
private Product[] productsMap;
private @Nullable String accessId = null;
private @Nullable String clientType = "ANDROID";
private Charset jsonGetStopsEncoding;
private Charset jsonGetStopsEncoding = Charsets.ISO_8859_1;
private boolean jsonGetStopsUseWeight = true;
private Charset jsonNearbyLocationsEncoding;
private Charset jsonNearbyLocationsEncoding = Charsets.ISO_8859_1;
private boolean dominantPlanStopTime = false;
private boolean useIso8601 = false;
private @Nullable String extXmlEndpoint = null;
@ -164,12 +164,6 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
public AbstractHafasProvider(final NetworkId network, final String stationBoardEndpoint, final String getStopEndpoint, final String queryEndpoint,
final Product[] productsMap)
{
this(network, stationBoardEndpoint, getStopEndpoint, queryEndpoint, productsMap, Charsets.ISO_8859_1);
}
public AbstractHafasProvider(final NetworkId network, final String stationBoardEndpoint, final String getStopEndpoint, final String queryEndpoint,
final Product[] productsMap, final Charset jsonEncoding)
{
super(network);
@ -177,8 +171,6 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
this.getStopEndpoint = getStopEndpoint;
this.queryEndpoint = queryEndpoint;
this.productsMap = productsMap;
this.jsonGetStopsEncoding = jsonEncoding;
this.jsonNearbyLocationsEncoding = jsonEncoding;
}
protected void setClientType(final String clientType)