mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-25 06:29:52 +01:00
cleanup client implementation
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
e984766631
commit
686e499875
@ -63,11 +63,6 @@ import okhttp3.ResponseBody;
|
||||
public final class TalkJsonNominatimClient implements NominatimClient {
|
||||
private static final String TAG = "TalkNominationClient";
|
||||
|
||||
/**
|
||||
* The default nominatim base URL.
|
||||
*/
|
||||
private static final String DEFAULT_BASE_URL = "https://nominatim.openstreetmap.org/";
|
||||
|
||||
/**
|
||||
* UTF-8 encoding.
|
||||
*/
|
||||
@ -100,27 +95,6 @@ public final class TalkJsonNominatimClient implements NominatimClient {
|
||||
*/
|
||||
private final NominatimOptions defaults;
|
||||
|
||||
/**
|
||||
* Creates the json nominatim client with the default base URL ({@value #DEFAULT_BASE_URL}.
|
||||
*
|
||||
* @param httpClient an HTTP client
|
||||
* @param email an email to add in the HTTP requests parameters to "sign" them
|
||||
*/
|
||||
public TalkJsonNominatimClient(final OkHttpClient httpClient, final String email) {
|
||||
this(DEFAULT_BASE_URL, httpClient, email, new NominatimOptions());
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the json nominatim client with the default base URL ({@value #DEFAULT_BASE_URL}.
|
||||
*
|
||||
* @param httpClient an HTTP client
|
||||
* @param email an email to add in the HTTP requests parameters to "sign" them
|
||||
* @param defaults defaults options, they override null valued requests options
|
||||
*/
|
||||
public TalkJsonNominatimClient(final OkHttpClient httpClient, final String email, final NominatimOptions defaults) {
|
||||
this(DEFAULT_BASE_URL, httpClient, email, defaults);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the json nominatim client.
|
||||
*
|
||||
@ -307,7 +281,7 @@ public final class TalkJsonNominatimClient implements NominatimClient {
|
||||
@Override
|
||||
public Address getAddress(final int longitudeE6, final int latitudeE6) throws IOException {
|
||||
|
||||
return this.getAddress((double) (longitudeE6 / 1E6), (double) (latitudeE6 / 1E6));
|
||||
return this.getAddress((longitudeE6 / 1E6), (latitudeE6 / 1E6));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user