|
|
|
|
252
|
continue;
|
252
|
continue;
|
253
|
}
|
253
|
}
|
254
|
|
254
|
|
255
|
- // netinfo is deprecated
|
|
|
256
|
- //if (netInfo.getType() == ConnectivityManager.TYPE_WIFI && netInfo.getState() == NetworkInfo.State.CONNECTED) {
|
|
|
|
|
255
|
+ // Don't use P2P Wi-Fi on recent samsung devices
|
|
|
256
|
+ if(caps.hasTransport(NetworkCapabilities.NET_CAPABILITY_WIFI_P2P)){
|
|
|
257
|
+ continue;
|
|
|
258
|
+ }
|
|
|
259
|
+
|
257
|
if(caps.hasTransport(NetworkCapabilities.TRANSPORT_WIFI)){
|
260
|
if(caps.hasTransport(NetworkCapabilities.TRANSPORT_WIFI)){
|
258
|
clientBuilder.proxy(Proxy.NO_PROXY);
|
261
|
clientBuilder.proxy(Proxy.NO_PROXY);
|
259
|
clientBuilder.socketFactory(network.getSocketFactory());
|
262
|
clientBuilder.socketFactory(network.getSocketFactory());
|