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:
Rafid Aslam 2018-10-26 11:07:27 +07:00 committed by Isaac Hutt
parent a97c88409c
commit 89acc8f5dc

View File

@ -58,6 +58,7 @@ import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.concurrent.TimeUnit;
import java.util.Locale;
import javax.inject.Inject;
@ -537,7 +538,7 @@ public class DownloadService extends Service {
// Keep attempting to download chunk despite network errors
while (attempts < timeout) {
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
Response response = httpClient.newCall(