Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[android] Change inlined okhttp3.Headers references to a Java import #17507

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import javax.annotation.Nullable;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.Headers;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
Expand Down Expand Up @@ -171,7 +172,7 @@ public void execute(Map<String, String> headers, Buffer body, boolean finished)
if (headers.containsKey("X-Http-Status")) {
status = Integer.parseInt(headers.get("X-Http-Status"));
}
processBundleResult(url, status, okhttp3.Headers.of(headers), body, outputFile, bundleInfo, callback);
processBundleResult(url, status, Headers.of(headers), body, outputFile, bundleInfo, callback);
} else {
if (!headers.containsKey("Content-Type") || !headers.get("Content-Type").equals("application/json")) {
return;
Expand Down Expand Up @@ -221,7 +222,7 @@ public void cancelDownloadBundleFromURL() {
private void processBundleResult(
String url,
int statusCode,
okhttp3.Headers headers,
Headers headers,
BufferedSource body,
File outputFile,
BundleInfo bundleInfo,
Expand Down Expand Up @@ -380,7 +381,7 @@ private static boolean isDeltaUrl(String bundleUrl) {
return bundleUrl.indexOf(".delta?") != -1;
}

private static void populateBundleInfo(String url, okhttp3.Headers headers, BundleInfo bundleInfo) {
private static void populateBundleInfo(String url, Headers headers, BundleInfo bundleInfo) {
bundleInfo.mUrl = url;

String filesChangedCountStr = headers.get("X-Metro-Files-Changed-Count");
Expand Down