|
|
@ -22,9 +22,6 @@ import com.fr.json.JSONException; |
|
|
|
import com.fr.json.JSONObject; |
|
|
|
import com.fr.json.JSONObject; |
|
|
|
import com.fr.json.JSONUtils; |
|
|
|
import com.fr.json.JSONUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.third.org.apache.http.HttpStatus; |
|
|
|
|
|
|
|
import com.fr.third.org.apache.http.StatusLine; |
|
|
|
|
|
|
|
import com.fr.third.org.apache.http.client.methods.HttpGet; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
@ -159,10 +156,9 @@ public class AlphaFineHelper { |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static boolean isNetworkOk(){ |
|
|
|
public static boolean isNetworkOk(){ |
|
|
|
HttpGet getHelp = new HttpGet(URL_FOR_TEST_NETWORK); |
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
StatusLine statusLine = HttpToolbox.getHttpClient(URL_FOR_TEST_NETWORK).execute(getHelp).getStatusLine(); |
|
|
|
HttpToolbox.get(URL_FOR_TEST_NETWORK); |
|
|
|
return statusLine.getStatusCode() == HttpStatus.SC_OK; |
|
|
|
return true; |
|
|
|
} catch (Exception ignore) { |
|
|
|
} catch (Exception ignore) { |
|
|
|
// 网络异常
|
|
|
|
// 网络异常
|
|
|
|
return false; |
|
|
|
return false; |
|
|
|