Match WIFI_P2P data usage.
Bug: 5405891 Change-Id: I5b815d6fc25a2f26a86c39a43fde305fcc3fb65c
This commit is contained in:
@@ -18,6 +18,7 @@ package android.net;
|
|||||||
|
|
||||||
import static android.net.ConnectivityManager.TYPE_ETHERNET;
|
import static android.net.ConnectivityManager.TYPE_ETHERNET;
|
||||||
import static android.net.ConnectivityManager.TYPE_WIFI;
|
import static android.net.ConnectivityManager.TYPE_WIFI;
|
||||||
|
import static android.net.ConnectivityManager.TYPE_WIFI_P2P;
|
||||||
import static android.net.ConnectivityManager.TYPE_WIMAX;
|
import static android.net.ConnectivityManager.TYPE_WIMAX;
|
||||||
import static android.net.NetworkIdentity.scrubSubscriberId;
|
import static android.net.NetworkIdentity.scrubSubscriberId;
|
||||||
import static android.telephony.TelephonyManager.NETWORK_CLASS_2_G;
|
import static android.telephony.TelephonyManager.NETWORK_CLASS_2_G;
|
||||||
@@ -231,11 +232,14 @@ public class NetworkTemplate implements Parcelable {
|
|||||||
* Check if matches Wi-Fi network template.
|
* Check if matches Wi-Fi network template.
|
||||||
*/
|
*/
|
||||||
private boolean matchesWifi(NetworkIdentity ident) {
|
private boolean matchesWifi(NetworkIdentity ident) {
|
||||||
if (ident.mType == TYPE_WIFI) {
|
switch (ident.mType) {
|
||||||
|
case TYPE_WIFI:
|
||||||
|
case TYPE_WIFI_P2P:
|
||||||
return true;
|
return true;
|
||||||
}
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if matches Ethernet network template.
|
* Check if matches Ethernet network template.
|
||||||
|
|||||||
Reference in New Issue
Block a user