File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 1818
1919import static android .net .ConnectivityManager .TYPE_ETHERNET ;
2020import static android .net .ConnectivityManager .TYPE_WIFI ;
21+ import static android .net .ConnectivityManager .TYPE_WIFI_P2P ;
2122import static android .net .ConnectivityManager .TYPE_WIMAX ;
2223import static android .net .NetworkIdentity .scrubSubscriberId ;
2324import static android .telephony .TelephonyManager .NETWORK_CLASS_2_G ;
@@ -231,10 +232,13 @@ private boolean matchesMobile4g(NetworkIdentity ident) {
231232 * Check if matches Wi-Fi network template.
232233 */
233234 private boolean matchesWifi (NetworkIdentity ident ) {
234- if (ident .mType == TYPE_WIFI ) {
235- return true ;
235+ switch (ident .mType ) {
236+ case TYPE_WIFI :
237+ case TYPE_WIFI_P2P :
238+ return true ;
239+ default :
240+ return false ;
236241 }
237- return false ;
238242 }
239243
240244 /**
You can’t perform that action at this time.
0 commit comments