Cleanup for inlines in D2595474
Differential Revision: D2637224 fb-gh-sync-id: 6947a06e2f2b9606fff84addec69dbc51cee84da
This commit is contained in:
parent
9d29b6c202
commit
f00e748ebd
|
@ -20,7 +20,6 @@ import android.content.Context;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
|
||||||
|
|
||||||
import com.facebook.common.logging.FLog;
|
import com.facebook.common.logging.FLog;
|
||||||
import com.facebook.infer.annotation.Assertions;
|
import com.facebook.infer.annotation.Assertions;
|
||||||
|
@ -161,8 +160,8 @@ public class DevServerHelper {
|
||||||
return Build.FINGERPRINT.contains("generic");
|
return Build.FINGERPRINT.contains("generic");
|
||||||
}
|
}
|
||||||
|
|
||||||
private String createBundleURL(String host, String jsModulePath, boolean devMode) {
|
private static String createBundleURL(String host, String jsModulePath, boolean devMode) {
|
||||||
return String.format(BUNDLE_URL_FORMAT, host, jsModulePath, devMode);
|
return String.format(Locale.US, BUNDLE_URL_FORMAT, host, jsModulePath, devMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void downloadBundleFromURL(
|
public void downloadBundleFromURL(
|
||||||
|
@ -209,7 +208,7 @@ public class DevServerHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void isPackagerRunning(final PackagerStatusCallback callback) {
|
public void isPackagerRunning(final PackagerStatusCallback callback) {
|
||||||
String statusURL = createPacakgerStatusURL(getDebugServerHost());
|
String statusURL = createPackagerStatusURL(getDebugServerHost());
|
||||||
Request request = new Request.Builder()
|
Request request = new Request.Builder()
|
||||||
.url(statusURL)
|
.url(statusURL)
|
||||||
.build();
|
.build();
|
||||||
|
@ -218,14 +217,14 @@ public class DevServerHelper {
|
||||||
new Callback() {
|
new Callback() {
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Request request, IOException e) {
|
public void onFailure(Request request, IOException e) {
|
||||||
Log.e(ReactConstants.TAG, "IOException requesting status from packager", e);
|
FLog.e(ReactConstants.TAG, "IOException requesting status from packager", e);
|
||||||
callback.onPackagerStatusFetched(false);
|
callback.onPackagerStatusFetched(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Response response) throws IOException {
|
public void onResponse(Response response) throws IOException {
|
||||||
if (!response.isSuccessful()) {
|
if (!response.isSuccessful()) {
|
||||||
Log.e(
|
FLog.e(
|
||||||
ReactConstants.TAG,
|
ReactConstants.TAG,
|
||||||
"Got non-success http code from packager when requesting status: " +
|
"Got non-success http code from packager when requesting status: " +
|
||||||
response.code());
|
response.code());
|
||||||
|
@ -234,14 +233,14 @@ public class DevServerHelper {
|
||||||
}
|
}
|
||||||
ResponseBody body = response.body();
|
ResponseBody body = response.body();
|
||||||
if (body == null) {
|
if (body == null) {
|
||||||
Log.e(
|
FLog.e(
|
||||||
ReactConstants.TAG,
|
ReactConstants.TAG,
|
||||||
"Got null body response from packager when requesting status");
|
"Got null body response from packager when requesting status");
|
||||||
callback.onPackagerStatusFetched(false);
|
callback.onPackagerStatusFetched(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!PACKAGER_OK_STATUS.equals(body.string())) {
|
if (!PACKAGER_OK_STATUS.equals(body.string())) {
|
||||||
Log.e(
|
FLog.e(
|
||||||
ReactConstants.TAG,
|
ReactConstants.TAG,
|
||||||
"Got unexpected response from packager when requesting status: " + body.string());
|
"Got unexpected response from packager when requesting status: " + body.string());
|
||||||
callback.onPackagerStatusFetched(false);
|
callback.onPackagerStatusFetched(false);
|
||||||
|
@ -252,8 +251,8 @@ public class DevServerHelper {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private String createPacakgerStatusURL(String host) {
|
private static String createPackagerStatusURL(String host) {
|
||||||
return String.format(PACKAGER_STATUS_URL_FORMAT, host);
|
return String.format(Locale.US, PACKAGER_STATUS_URL_FORMAT, host);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void stopPollingOnChangeEndpoint() {
|
public void stopPollingOnChangeEndpoint() {
|
||||||
|
|
Loading…
Reference in New Issue