[jni] review fixes

This commit is contained in:
Arsentiy Milchakov 2018-02-02 15:57:39 +03:00 committed by Aleksandr Zatsepin
parent 5acebc39ab
commit 467714d1d4
2 changed files with 22 additions and 19 deletions

View file

@ -8,5 +8,8 @@ com/mapswithme/util/log/LoggerFactory.class
com/mapswithme/util/HttpClient.class
com/mapswithme/util/HttpClient$Params.class
com/mapswithme/util/HttpClient$HttpHeader.class
com/mapswithme/util/HttpUploader.class
com/mapswithme/util/HttpUploader$Result.class
com/mapswithme/util/KeyValue.class
com/mapswithme/util/Utils.class
com/my/tracker/MyTracker.class

View file

@ -21,6 +21,25 @@ final class HttpUploader
@NonNull
private final String mFilePath;
@SuppressWarnings("unused")
private HttpUploader(@NonNull String method, @NonNull String url, @NonNull KeyValue[] params,
@NonNull KeyValue[] headers, @NonNull String fileKey, @NonNull String filePath)
{
mMethod = method;
mUrl = url;
mParams = new ArrayList<>(Arrays.asList(params));
mHeaders = new ArrayList<>(Arrays.asList(headers));
mFileKey = fileKey;
mFilePath = filePath;
}
@SuppressWarnings("unused")
private Result upload()
{
// Dummy. Error code 200 - Http OK.
return new Result(200, "");
}
private static class Result
{
private final int mHttpCode;
@ -44,23 +63,4 @@ final class HttpUploader
return mDescription;
}
}
@SuppressWarnings("unused")
private HttpUploader(@NonNull String method, @NonNull String url, @NonNull KeyValue[] params,
@NonNull KeyValue[] headers, @NonNull String fileKey, @NonNull String filePath)
{
mMethod = method;
mUrl = url;
mParams = new ArrayList<>(Arrays.asList(params));
mHeaders = new ArrayList<>(Arrays.asList(headers));
mFileKey = fileKey;
mFilePath = filePath;
}
@SuppressWarnings("unused")
private Result upload()
{
// Dummy. Error code 200 - Http OK.
return new Result(200, "");
}
}