mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-15 18:36:01 -04:00
Fix lint warnings and errors in DownloadService.java
Fix lint warnings and errors in DownloadService.java by adding locale parameter in a String.format() call. Related to https://github.com/kiwix/kiwix-android/issues/98
This commit is contained in:
parent
a97c88409c
commit
89acc8f5dc
@ -58,6 +58,7 @@ import java.net.MalformedURLException;
|
|||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
@ -537,7 +538,7 @@ public class DownloadService extends Service {
|
|||||||
// Keep attempting to download chunk despite network errors
|
// Keep attempting to download chunk despite network errors
|
||||||
while (attempts < timeout) {
|
while (attempts < timeout) {
|
||||||
try {
|
try {
|
||||||
String rangeHeader = String.format("%d-%d", downloaded, chunk.getEndByte());
|
String rangeHeader = String.format(Locale.US, "%d-%d", downloaded, chunk.getEndByte());
|
||||||
|
|
||||||
// Build request with up to date range
|
// Build request with up to date range
|
||||||
Response response = httpClient.newCall(
|
Response response = httpClient.newCall(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user