Skip to content

Commit

Permalink
Change inlined okhttp3.Headers references to a Java import
Browse files Browse the repository at this point in the history
Summary:
In BundleDownloader.java, there were references to `okhttp3.Headers` instead of importing the class at the top of the file. This PR is a simple change to use an import instead.

Compile the Android app

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/react-native-website, and link to your PR here.)

[ANDROID][MINOR][BundleDownloader] - Use Java import instead of fully qualified class name
Closes #17507

Differential Revision: D6691593

Pulled By: hramos

fbshipit-source-id: 81b366db608b7be8a903d2f25b36ca5642d9eec3
  • Loading branch information
ide authored and facebook-github-bot committed Jan 10, 2018
1 parent b9b7fab commit 7f58189
Showing 1 changed file with 4 additions and 3 deletions.
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

0 comments on commit 7f58189

Please sign in to comment.