|
|
@@ -91,21 +91,22 @@ public class NetUtil {
|
|
|
* @return
|
|
|
*/
|
|
|
public static boolean isWifiProxy() {
|
|
|
- if(TestUtil.isTest()){
|
|
|
- return false;
|
|
|
- }
|
|
|
- Context context = SheepApp.getInstance();
|
|
|
- final boolean IS_ICS_OR_LATER = Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH;
|
|
|
- String proxyAddress;
|
|
|
- int proxyPort;
|
|
|
- if (IS_ICS_OR_LATER) {
|
|
|
- proxyAddress = System.getProperty("http.proxyHost");
|
|
|
- String portStr = System.getProperty("http.proxyPort");
|
|
|
- proxyPort = Integer.parseInt((portStr != null ? portStr : "-1"));
|
|
|
- } else {
|
|
|
- proxyAddress = android.net.Proxy.getHost(context);
|
|
|
- proxyPort = android.net.Proxy.getPort(context);
|
|
|
- }
|
|
|
- return (!TextUtils.isEmpty(proxyAddress)) && (proxyPort != -1);
|
|
|
+ return false;
|
|
|
+// if(TestUtil.isTest()){
|
|
|
+// return false;
|
|
|
+// }
|
|
|
+// Context context = SheepApp.getInstance();
|
|
|
+// final boolean IS_ICS_OR_LATER = Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH;
|
|
|
+// String proxyAddress;
|
|
|
+// int proxyPort;
|
|
|
+// if (IS_ICS_OR_LATER) {
|
|
|
+// proxyAddress = System.getProperty("http.proxyHost");
|
|
|
+// String portStr = System.getProperty("http.proxyPort");
|
|
|
+// proxyPort = Integer.parseInt((portStr != null ? portStr : "-1"));
|
|
|
+// } else {
|
|
|
+// proxyAddress = android.net.Proxy.getHost(context);
|
|
|
+// proxyPort = android.net.Proxy.getPort(context);
|
|
|
+// }
|
|
|
+// return (!TextUtils.isEmpty(proxyAddress)) && (proxyPort != -1);
|
|
|
}
|
|
|
}
|