Loading wifi/java/android/net/wifi/ScanResult.java +43 −0 Original line number Diff line number Diff line Loading @@ -431,6 +431,28 @@ public class ScanResult implements Parcelable { */ public AnqpInformationElement[] anqpElements; /** * Flag indicating if this AP is a carrier AP. The determination is based * on the AP's SSID and if AP is using EAP security. * * @hide */ public boolean isCarrierAp; /** * The EAP type {@link WifiEnterpriseConfig.Eap} associated with this AP if it is a carrier AP. * * @hide */ public int carrierApEapType; /** * The name of the carrier that's associated with this AP if it is a carrier AP. * * @hide */ public String carrierName; /** {@hide} */ public ScanResult(WifiSsid wifiSsid, String BSSID, long hessid, int anqpDomainId, byte[] osuProviders, String caps, int level, int frequency, long tsf) { Loading @@ -455,6 +477,9 @@ public class ScanResult implements Parcelable { this.centerFreq0 = UNSPECIFIED; this.centerFreq1 = UNSPECIFIED; this.flags = 0; this.isCarrierAp = false; this.carrierApEapType = UNSPECIFIED; this.carrierName = null; } /** {@hide} */ Loading @@ -473,6 +498,9 @@ public class ScanResult implements Parcelable { this.centerFreq0 = UNSPECIFIED; this.centerFreq1 = UNSPECIFIED; this.flags = 0; this.isCarrierAp = false; this.carrierApEapType = UNSPECIFIED; this.carrierName = null; } /** {@hide} */ Loading @@ -498,6 +526,9 @@ public class ScanResult implements Parcelable { } else { this.flags = 0; } this.isCarrierAp = false; this.carrierApEapType = UNSPECIFIED; this.carrierName = null; } /** {@hide} */ Loading Loading @@ -537,6 +568,9 @@ public class ScanResult implements Parcelable { venueName = source.venueName; operatorFriendlyName = source.operatorFriendlyName; flags = source.flags; isCarrierAp = source.isCarrierAp; carrierApEapType = source.carrierApEapType; carrierName = source.carrierName; } } Loading Loading @@ -577,6 +611,9 @@ public class ScanResult implements Parcelable { sb.append(", centerFreq1: ").append(centerFreq1); sb.append(", 80211mcResponder: "); sb.append(((flags & FLAG_80211mc_RESPONDER) != 0) ? "is supported" : "is not supported"); sb.append(", Carrier AP: ").append(isCarrierAp ? "yes" : "no"); sb.append(", Carrier AP EAP Type: ").append(carrierApEapType); sb.append(", Carrier name: ").append(carrierName); return sb.toString(); } Loading Loading @@ -646,6 +683,9 @@ public class ScanResult implements Parcelable { } else { dest.writeInt(0); } dest.writeInt(isCarrierAp ? 1 : 0); dest.writeInt(carrierApEapType); dest.writeString(carrierName); } /** Implement the Parcelable interface {@hide} */ Loading Loading @@ -715,6 +755,9 @@ public class ScanResult implements Parcelable { new AnqpInformationElement(vendorId, elementId, payload); } } sr.isCarrierAp = in.readInt() != 0; sr.carrierApEapType = in.readInt(); sr.carrierName = in.readString(); return sr; } Loading Loading
wifi/java/android/net/wifi/ScanResult.java +43 −0 Original line number Diff line number Diff line Loading @@ -431,6 +431,28 @@ public class ScanResult implements Parcelable { */ public AnqpInformationElement[] anqpElements; /** * Flag indicating if this AP is a carrier AP. The determination is based * on the AP's SSID and if AP is using EAP security. * * @hide */ public boolean isCarrierAp; /** * The EAP type {@link WifiEnterpriseConfig.Eap} associated with this AP if it is a carrier AP. * * @hide */ public int carrierApEapType; /** * The name of the carrier that's associated with this AP if it is a carrier AP. * * @hide */ public String carrierName; /** {@hide} */ public ScanResult(WifiSsid wifiSsid, String BSSID, long hessid, int anqpDomainId, byte[] osuProviders, String caps, int level, int frequency, long tsf) { Loading @@ -455,6 +477,9 @@ public class ScanResult implements Parcelable { this.centerFreq0 = UNSPECIFIED; this.centerFreq1 = UNSPECIFIED; this.flags = 0; this.isCarrierAp = false; this.carrierApEapType = UNSPECIFIED; this.carrierName = null; } /** {@hide} */ Loading @@ -473,6 +498,9 @@ public class ScanResult implements Parcelable { this.centerFreq0 = UNSPECIFIED; this.centerFreq1 = UNSPECIFIED; this.flags = 0; this.isCarrierAp = false; this.carrierApEapType = UNSPECIFIED; this.carrierName = null; } /** {@hide} */ Loading @@ -498,6 +526,9 @@ public class ScanResult implements Parcelable { } else { this.flags = 0; } this.isCarrierAp = false; this.carrierApEapType = UNSPECIFIED; this.carrierName = null; } /** {@hide} */ Loading Loading @@ -537,6 +568,9 @@ public class ScanResult implements Parcelable { venueName = source.venueName; operatorFriendlyName = source.operatorFriendlyName; flags = source.flags; isCarrierAp = source.isCarrierAp; carrierApEapType = source.carrierApEapType; carrierName = source.carrierName; } } Loading Loading @@ -577,6 +611,9 @@ public class ScanResult implements Parcelable { sb.append(", centerFreq1: ").append(centerFreq1); sb.append(", 80211mcResponder: "); sb.append(((flags & FLAG_80211mc_RESPONDER) != 0) ? "is supported" : "is not supported"); sb.append(", Carrier AP: ").append(isCarrierAp ? "yes" : "no"); sb.append(", Carrier AP EAP Type: ").append(carrierApEapType); sb.append(", Carrier name: ").append(carrierName); return sb.toString(); } Loading Loading @@ -646,6 +683,9 @@ public class ScanResult implements Parcelable { } else { dest.writeInt(0); } dest.writeInt(isCarrierAp ? 1 : 0); dest.writeInt(carrierApEapType); dest.writeString(carrierName); } /** Implement the Parcelable interface {@hide} */ Loading Loading @@ -715,6 +755,9 @@ public class ScanResult implements Parcelable { new AnqpInformationElement(vendorId, elementId, payload); } } sr.isCarrierAp = in.readInt() != 0; sr.carrierApEapType = in.readInt(); sr.carrierName = in.readString(); return sr; } Loading