Merge "Hotspot 2.0 framework - add implementation"
This commit is contained in:
@@ -333,7 +333,7 @@ LOCAL_SRC_FILES += \
|
||||
telephony/java/com/android/internal/telephony/ISms.aidl \
|
||||
telephony/java/com/android/internal/telephony/IWapPushManager.aidl \
|
||||
wifi/java/android/net/wifi/IWifiManager.aidl \
|
||||
wifi/java/android/net/wifi/passpoint/IPasspointManager.aidl \
|
||||
wifi/java/android/net/wifi/passpoint/IWifiPasspointManager.aidl \
|
||||
wifi/java/android/net/wifi/p2p/IWifiP2pManager.aidl \
|
||||
wifi/java/android/net/wifi/IWifiScanner.aidl \
|
||||
packages/services/PacProcessor/com/android/net/IProxyService.aidl \
|
||||
|
||||
113
api/current.txt
113
api/current.txt
@@ -17029,9 +17029,11 @@ package android.net.wifi {
|
||||
}
|
||||
|
||||
public static final class WifiEnterpriseConfig.Eap {
|
||||
field public static final int AKA = 5; // 0x5
|
||||
field public static final int NONE = -1; // 0xffffffff
|
||||
field public static final int PEAP = 0; // 0x0
|
||||
field public static final int PWD = 3; // 0x3
|
||||
field public static final int SIM = 4; // 0x4
|
||||
field public static final int TLS = 1; // 0x1
|
||||
field public static final int TTLS = 2; // 0x2
|
||||
}
|
||||
@@ -17427,108 +17429,23 @@ package android.net.wifi.p2p.nsd {
|
||||
|
||||
package android.net.wifi.passpoint {
|
||||
|
||||
public abstract interface IPasspointManager implements android.os.IInterface {
|
||||
method public abstract android.os.Messenger getMessenger() throws android.os.RemoteException;
|
||||
method public abstract int getPasspointState() throws android.os.RemoteException;
|
||||
}
|
||||
|
||||
public class PasspointCredential implements android.os.Parcelable {
|
||||
ctor public PasspointCredential();
|
||||
public class WifiPasspointCredential implements android.os.Parcelable {
|
||||
ctor public WifiPasspointCredential(java.lang.String, android.net.wifi.WifiEnterpriseConfig);
|
||||
method public int describeContents();
|
||||
method public java.lang.String getClientCertPath();
|
||||
method public int getEapMethod();
|
||||
method public java.lang.String getFqdn();
|
||||
method public java.lang.String getImsi();
|
||||
method public java.lang.String getRealm();
|
||||
method public java.lang.String getUserName();
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
}
|
||||
|
||||
public class PasspointInfo implements android.os.Parcelable {
|
||||
method public int describeContents();
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final int ANQP_CAPABILITY = 1; // 0x1
|
||||
field public static final int CELLULAR_NETWORK = 64; // 0x40
|
||||
field public static final int CONNECTION_CAPABILITY = 2048; // 0x800
|
||||
field public static final int DOMAIN_NAME = 128; // 0x80
|
||||
field public static final int HOTSPOT_CAPABILITY = 256; // 0x100
|
||||
field public static final int IP_ADDR_TYPE_AVAILABILITY = 16; // 0x10
|
||||
field public static final int NAI_REALM = 32; // 0x20
|
||||
field public static final int NETWORK_AUTH_TYPE = 4; // 0x4
|
||||
field public static final int OPERATOR_FRIENDLY_NAME = 512; // 0x200
|
||||
field public static final int OSU_PROVIDER = 4096; // 0x1000
|
||||
field public static final int PRESET_ALL = 8191; // 0x1fff
|
||||
field public static final int PRESET_CRED_MATCH = 481; // 0x1e1
|
||||
field public static final int ROAMING_CONSORTIUM = 8; // 0x8
|
||||
field public static final int VENUE_NAME = 2; // 0x2
|
||||
field public static final int WAN_METRICS = 1024; // 0x400
|
||||
field public java.lang.String bssid;
|
||||
field public java.lang.String cellularNetwork;
|
||||
field public java.lang.String connectionCapability;
|
||||
field public java.lang.String domainName;
|
||||
field public java.lang.String ipAddrTypeAvaibility;
|
||||
field public java.lang.String naiRealm;
|
||||
field public java.lang.String networkAuthType;
|
||||
field public java.lang.String operatorFriendlyName;
|
||||
field public java.util.List osuProviderList;
|
||||
field public java.lang.String roamingConsortium;
|
||||
field public java.lang.String venueName;
|
||||
field public java.lang.String wanMetrics;
|
||||
}
|
||||
|
||||
public class PasspointManager {
|
||||
ctor public PasspointManager(android.content.Context, android.net.wifi.passpoint.IPasspointManager);
|
||||
method public boolean addCredential(android.net.wifi.passpoint.PasspointCredential);
|
||||
method public void connect(android.net.wifi.passpoint.PasspointPolicy);
|
||||
method public int getPasspointState();
|
||||
method public java.util.List<android.net.wifi.passpoint.PasspointCredential> getSavedCredentials();
|
||||
method public android.net.wifi.passpoint.PasspointManager.Channel initialize(android.content.Context, android.os.Looper, android.net.wifi.passpoint.PasspointManager.ChannelListener);
|
||||
method public boolean removeCredential(android.net.wifi.passpoint.PasspointCredential);
|
||||
method public java.util.List<android.net.wifi.passpoint.PasspointPolicy> requestCredentialMatch(java.util.List<android.net.wifi.ScanResult>);
|
||||
method public void requestOsuIcons(android.net.wifi.passpoint.PasspointManager.Channel, java.util.List<android.net.wifi.passpoint.PasspointOsuProvider>, int, android.net.wifi.passpoint.PasspointManager.ActionListener);
|
||||
method public boolean updateCredential(android.net.wifi.passpoint.PasspointCredential);
|
||||
field public static final int BUSY = 2; // 0x2
|
||||
field public static final int ERROR = 0; // 0x0
|
||||
field public static final java.lang.String PASSPOINT_CRED_CHANGED_ACTION = "android.net.wifi.passpoint.CRED_CHANGE";
|
||||
field public static final int PASSPOINT_STATE_ACCESS = 3; // 0x3
|
||||
field public static final java.lang.String PASSPOINT_STATE_CHANGED_ACTION = "android.net.wifi.passpoint.STATE_CHANGE";
|
||||
field public static final int PASSPOINT_STATE_DISABLED = 1; // 0x1
|
||||
field public static final int PASSPOINT_STATE_DISCOVERY = 2; // 0x2
|
||||
field public static final int PASSPOINT_STATE_PROVISION = 4; // 0x4
|
||||
field public static final int PASSPOINT_STATE_UNKNOWN = 0; // 0x0
|
||||
field public static final int WIFI_DISABLED = 1; // 0x1
|
||||
}
|
||||
|
||||
public static abstract interface PasspointManager.ActionListener {
|
||||
method public abstract void onFailure(int);
|
||||
method public abstract void onSuccess();
|
||||
}
|
||||
|
||||
public static class PasspointManager.Channel {
|
||||
}
|
||||
|
||||
public static abstract interface PasspointManager.ChannelListener {
|
||||
method public abstract void onChannelDisconnected();
|
||||
}
|
||||
|
||||
public class PasspointOsuProvider implements android.os.Parcelable {
|
||||
method public int describeContents();
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final android.os.Parcelable.Creator CREATOR;
|
||||
field public static final int OSU_METHOD_OMADM = 0; // 0x0
|
||||
field public static final int OSU_METHOD_SOAP = 1; // 0x1
|
||||
field public static final int OSU_METHOD_UNKNOWN = -1; // 0xffffffff
|
||||
field public java.lang.String friendlyName;
|
||||
field public java.lang.Object icon;
|
||||
field public java.lang.String iconFileName;
|
||||
field public int iconHeight;
|
||||
field public java.lang.String iconType;
|
||||
field public int iconWidth;
|
||||
field public int osuMethod;
|
||||
field public java.lang.String osuNai;
|
||||
field public java.lang.String osuService;
|
||||
field public java.lang.String serverUri;
|
||||
field public java.lang.String ssid;
|
||||
}
|
||||
|
||||
public class PasspointPolicy implements android.os.Parcelable {
|
||||
ctor public PasspointPolicy();
|
||||
method public int describeContents();
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
public class WifiPasspointManager {
|
||||
method public boolean addCredential(android.net.wifi.passpoint.WifiPasspointCredential);
|
||||
method public java.util.List<android.net.wifi.passpoint.WifiPasspointCredential> getSavedCredentials();
|
||||
method public boolean removeCredential(android.net.wifi.passpoint.WifiPasspointCredential);
|
||||
method public boolean updateCredential(android.net.wifi.passpoint.WifiPasspointCredential);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -81,8 +81,8 @@ import android.net.nsd.INsdManager;
|
||||
import android.net.nsd.NsdManager;
|
||||
import android.net.wifi.IWifiManager;
|
||||
import android.net.wifi.WifiManager;
|
||||
import android.net.wifi.passpoint.IPasspointManager;
|
||||
import android.net.wifi.passpoint.PasspointManager;
|
||||
import android.net.wifi.passpoint.IWifiPasspointManager;
|
||||
import android.net.wifi.passpoint.WifiPasspointManager;
|
||||
import android.net.wifi.p2p.IWifiP2pManager;
|
||||
import android.net.wifi.p2p.WifiP2pManager;
|
||||
import android.nfc.NfcManager;
|
||||
@@ -581,8 +581,8 @@ class ContextImpl extends Context {
|
||||
registerService(WIFI_PASSPOINT_SERVICE, new ServiceFetcher() {
|
||||
public Object createService(ContextImpl ctx) {
|
||||
IBinder b = ServiceManager.getService(WIFI_PASSPOINT_SERVICE);
|
||||
IPasspointManager service = IPasspointManager.Stub.asInterface(b);
|
||||
return new PasspointManager(ctx.getOuterContext(), service);
|
||||
IWifiPasspointManager service = IWifiPasspointManager.Stub.asInterface(b);
|
||||
return new WifiPasspointManager(ctx.getOuterContext(), service);
|
||||
}});
|
||||
|
||||
registerService(WIFI_P2P_SERVICE, new ServiceFetcher() {
|
||||
|
||||
@@ -2352,11 +2352,11 @@ public abstract class Context {
|
||||
|
||||
/**
|
||||
* Use with {@link #getSystemService} to retrieve a {@link
|
||||
* android.net.wifi.passpoint.PasspointManager} for handling management of
|
||||
* android.net.wifi.passpoint.WifiPasspointManager} for handling management of
|
||||
* Wi-Fi passpoint access.
|
||||
*
|
||||
* @see #getSystemService
|
||||
* @see android.net.wifi.passpoint.PasspointManager
|
||||
* @see android.net.wifi.passpoint.WifiPasspointManager
|
||||
*/
|
||||
public static final String WIFI_PASSPOINT_SERVICE = "wifipasspoint";
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
package android.net.wifi;
|
||||
|
||||
import android.net.wifi.passpoint.PasspointInfo;
|
||||
import android.net.wifi.passpoint.PasspointManager;
|
||||
import android.net.wifi.passpoint.WifiPasspointInfo;
|
||||
import android.net.wifi.passpoint.WifiPasspointManager;
|
||||
import android.os.Parcelable;
|
||||
import android.os.Parcel;
|
||||
|
||||
@@ -80,10 +80,10 @@ public class ScanResult implements Parcelable {
|
||||
|
||||
/**
|
||||
* Passpoint ANQP information. This is not fetched automatically.
|
||||
* Use {@link PasspointManager#requestAnqpInfo} to request ANQP info.
|
||||
* Use {@link WifiPasspointManager#requestAnqpInfo} to request ANQP info.
|
||||
* {@hide}
|
||||
*/
|
||||
public PasspointInfo passpoint;
|
||||
public WifiPasspointInfo passpoint;
|
||||
|
||||
/**
|
||||
* {@hide}
|
||||
@@ -132,7 +132,7 @@ public class ScanResult implements Parcelable {
|
||||
distanceSdCm = source.distanceSdCm;
|
||||
seen = source.seen;
|
||||
if (source.passpoint != null)
|
||||
passpoint = new PasspointInfo(source.passpoint);
|
||||
passpoint = new WifiPasspointInfo(source.passpoint);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@ public class ScanResult implements Parcelable {
|
||||
in.readInt()
|
||||
);
|
||||
if (in.readInt() == 1) {
|
||||
sr.passpoint = PasspointInfo.CREATOR.createFromParcel(in);
|
||||
sr.passpoint = WifiPasspointInfo.CREATOR.createFromParcel(in);
|
||||
}
|
||||
return sr;
|
||||
}
|
||||
|
||||
@@ -224,8 +224,12 @@ public class WifiEnterpriseConfig implements Parcelable {
|
||||
public static final int TTLS = 2;
|
||||
/** EAP-Password */
|
||||
public static final int PWD = 3;
|
||||
/** EAP-Subscriber Identity Module */
|
||||
public static final int SIM = 4;
|
||||
/** EAP-Authentication and Key Agreement */
|
||||
public static final int AKA = 5;
|
||||
/** @hide */
|
||||
public static final String[] strings = { "PEAP", "TLS", "TTLS", "PWD" };
|
||||
public static final String[] strings = { "PEAP", "TLS", "TTLS", "PWD", "SIM", "AKA" };
|
||||
|
||||
/** Prevent initialization */
|
||||
private Eap() {}
|
||||
@@ -271,6 +275,8 @@ public class WifiEnterpriseConfig implements Parcelable {
|
||||
case Eap.PWD:
|
||||
case Eap.TLS:
|
||||
case Eap.TTLS:
|
||||
case Eap.SIM:
|
||||
case Eap.AKA:
|
||||
mFields.put(EAP_KEY, Eap.strings[eapMethod]);
|
||||
mFields.put(OPP_KEY_CACHING, "1");
|
||||
break;
|
||||
|
||||
@@ -19,11 +19,11 @@ package android.net.wifi.passpoint;
|
||||
import android.os.Messenger;
|
||||
|
||||
/**
|
||||
* Interface that allows controlling and querying Passpoint connectivity.
|
||||
* Interface that allows controlling and querying Wifi Passpoint connectivity.
|
||||
*
|
||||
* {@hide}
|
||||
*/
|
||||
interface IPasspointManager
|
||||
interface IWifiPasspointManager
|
||||
{
|
||||
Messenger getMessenger();
|
||||
int getPasspointState();
|
||||
@@ -1,56 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2014 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.net.wifi.passpoint;
|
||||
|
||||
import android.os.Parcelable;
|
||||
import android.os.Parcel;
|
||||
|
||||
public class PasspointCredential implements Parcelable {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
/** Implement the Parcelable interface {@hide} */
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** Implement the Parcelable interface {@hide} */
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
/** Implement the Parcelable interface {@hide} */
|
||||
public static final Creator<PasspointCredential> CREATOR =
|
||||
new Creator<PasspointCredential>() {
|
||||
@Override
|
||||
public PasspointCredential createFromParcel(Parcel in) {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PasspointCredential[] newArray(int size) {
|
||||
return new PasspointCredential[size];
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2014 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.net.wifi.passpoint;
|
||||
|
||||
import android.os.Parcelable;
|
||||
import android.os.Parcel;
|
||||
|
||||
public class PasspointPolicy implements Parcelable {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
/** Implement the Parcelable interface {@hide} */
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** Implement the Parcelable interface {@hide} */
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
/** Implement the Parcelable interface {@hide} */
|
||||
public static final Creator<PasspointPolicy> CREATOR =
|
||||
new Creator<PasspointPolicy>() {
|
||||
@Override
|
||||
public PasspointPolicy createFromParcel(Parcel in) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PasspointPolicy[] newArray(int size) {
|
||||
return new PasspointPolicy[size];
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -16,4 +16,4 @@
|
||||
|
||||
package android.net.wifi.passpoint;
|
||||
|
||||
parcelable PasspointOsuProvider;
|
||||
parcelable WifiPasspointCredential;
|
||||
@@ -0,0 +1,711 @@
|
||||
/*
|
||||
* Copyright (C) 2014 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.net.wifi.passpoint;
|
||||
|
||||
import android.net.wifi.WifiEnterpriseConfig;
|
||||
import android.os.Parcelable;
|
||||
import android.os.Parcel;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Set;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
public class WifiPasspointCredential implements Parcelable {
|
||||
|
||||
private final static String TAG = "PasspointCredential";
|
||||
private String mWifiSPFQDN;
|
||||
private String mCredentialName;
|
||||
private String mUpdateIdentifier;
|
||||
private String mSubscriptionUpdateMethod;
|
||||
private String mType;
|
||||
private String mInnerMethod;
|
||||
private String mCertType;
|
||||
private String mCertSha256Fingerprint;
|
||||
private String mUsername;
|
||||
private String mPasswd;
|
||||
private String mImsi;
|
||||
private String mMcc;
|
||||
private String mMnc;
|
||||
private String mCaRootCert;
|
||||
private String mRealm;
|
||||
private int mPriority; //User preferred priority; The smaller, the higher
|
||||
private boolean mUserPreferred = false;
|
||||
private String mHomeSpFqdn;
|
||||
private String mFriendlyName;
|
||||
private String mOtherhomepartnerFqdn;
|
||||
private String mClientCert;
|
||||
private String mCreationDate;
|
||||
private String mExpirationDate;
|
||||
|
||||
private String mSubscriptionDMAccUsername;
|
||||
private String mSubscriptionDMAccPassword;
|
||||
private String mSubscriptionUpdateInterval;
|
||||
|
||||
private String mPolicyUpdateURI;
|
||||
private String mPolicyUpdateInterval;
|
||||
private String mPolicyDMAccUsername;
|
||||
private String mPolicyDMAccPassword;
|
||||
private String mPolicyUpdateRestriction;
|
||||
private String mPolicyUpdateMethod;
|
||||
|
||||
private Collection<WifiPasspointDmTree.PreferredRoamingPartnerList> mPreferredRoamingPartnerList;
|
||||
private Collection<WifiPasspointDmTree.HomeOIList> mHomeOIList;
|
||||
private Collection<WifiPasspointDmTree.MinBackhaulThresholdNetwork> mMinBackhaulThresholdNetwork;
|
||||
private Collection<WifiPasspointDmTree.RequiredProtoPortTuple> mRequiredProtoPortTuple;
|
||||
private Collection<WifiPasspointDmTree.SPExclusionList> mSpExclusionList;
|
||||
private String mMaxBssLoad;
|
||||
|
||||
private boolean mIsMachineRemediation;
|
||||
|
||||
private String mAAACertURL;
|
||||
private String mAAASha256Fingerprint;
|
||||
|
||||
private String mSubscriptionUpdateRestriction;
|
||||
private String mSubscriptionUpdateURI;
|
||||
|
||||
private boolean mCheckAaaServerCertStatus;
|
||||
|
||||
/** @hide */
|
||||
public WifiPasspointCredential() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param realm Realm of the passpoint credential
|
||||
* @param config Credential information, must be either EAP-TLS or EAP-TTLS.
|
||||
* @see WifiEnterpriseConfig
|
||||
*/
|
||||
public WifiPasspointCredential(String realm, WifiEnterpriseConfig config) {
|
||||
mRealm = realm;
|
||||
switch (config.getEapMethod()) {
|
||||
case WifiEnterpriseConfig.Eap.TLS:
|
||||
// TODO;
|
||||
break;
|
||||
case WifiEnterpriseConfig.Eap.TTLS:
|
||||
// TODO;
|
||||
break;
|
||||
default:
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public WifiPasspointCredential(String type,
|
||||
String caroot,
|
||||
String clientcert,
|
||||
WifiPasspointDmTree.SpFqdn sp,
|
||||
WifiPasspointDmTree.CredentialInfo credinfo) {
|
||||
|
||||
if (credinfo == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
mType = type;
|
||||
mCaRootCert = caroot;
|
||||
mClientCert = clientcert;
|
||||
|
||||
mWifiSPFQDN = sp.nodeName;
|
||||
mUpdateIdentifier = sp.perProviderSubscription.UpdateIdentifier;
|
||||
|
||||
mCredentialName = credinfo.nodeName;
|
||||
Set set = credinfo.homeSP.otherHomePartners.entrySet();
|
||||
Iterator i = set.iterator();
|
||||
if (i.hasNext()) {
|
||||
Map.Entry entry3 = (Map.Entry) i.next();
|
||||
WifiPasspointDmTree.OtherHomePartners ohp = (WifiPasspointDmTree.OtherHomePartners) entry3.getValue();
|
||||
mOtherhomepartnerFqdn = ohp.FQDN;
|
||||
}
|
||||
|
||||
set = credinfo.aAAServerTrustRoot.entrySet();
|
||||
i = set.iterator();
|
||||
if (i.hasNext()) {
|
||||
Map.Entry entry3 = (Map.Entry) i.next();
|
||||
WifiPasspointDmTree.AAAServerTrustRoot aaa = (WifiPasspointDmTree.AAAServerTrustRoot) entry3.getValue();
|
||||
mAAACertURL = aaa.CertURL;
|
||||
mAAASha256Fingerprint = aaa.CertSHA256Fingerprint;
|
||||
}
|
||||
|
||||
mCertType = credinfo.credential.digitalCertificate.CertificateType;
|
||||
mCertSha256Fingerprint = credinfo.credential.digitalCertificate.CertSHA256Fingerprint;
|
||||
mUsername = credinfo.credential.usernamePassword.Username;
|
||||
mPasswd = credinfo.credential.usernamePassword.Password;
|
||||
mIsMachineRemediation = credinfo.credential.usernamePassword.MachineManaged;
|
||||
mInnerMethod = credinfo.credential.usernamePassword.eAPMethod.InnerMethod;
|
||||
mImsi = credinfo.credential.sim.IMSI;
|
||||
mCreationDate = credinfo.credential.CreationDate;
|
||||
mExpirationDate = credinfo.credential.ExpirationDate;
|
||||
mRealm = credinfo.credential.Realm;
|
||||
|
||||
if (credinfo.credentialPriority == null) {
|
||||
credinfo.credentialPriority = "128";
|
||||
}
|
||||
mPriority = Integer.parseInt(credinfo.credentialPriority);
|
||||
|
||||
mHomeSpFqdn = credinfo.homeSP.FQDN;
|
||||
|
||||
mSubscriptionUpdateInterval = credinfo.subscriptionUpdate.UpdateInterval;
|
||||
mSubscriptionUpdateMethod = credinfo.subscriptionUpdate.UpdateMethod;
|
||||
mSubscriptionUpdateRestriction = credinfo.subscriptionUpdate.Restriction;
|
||||
mSubscriptionUpdateURI = credinfo.subscriptionUpdate.URI;
|
||||
mSubscriptionDMAccUsername = credinfo.subscriptionUpdate.usernamePassword.Username;
|
||||
mSubscriptionDMAccPassword = credinfo.subscriptionUpdate.usernamePassword.Password;
|
||||
|
||||
mPolicyUpdateURI = credinfo.policy.policyUpdate.URI;
|
||||
mPolicyUpdateInterval = credinfo.policy.policyUpdate.UpdateInterval;
|
||||
mPolicyDMAccUsername = credinfo.policy.policyUpdate.usernamePassword.Username;
|
||||
mPolicyDMAccPassword = credinfo.policy.policyUpdate.usernamePassword.Password;
|
||||
mPolicyUpdateRestriction = credinfo.policy.policyUpdate.Restriction;
|
||||
mPolicyUpdateMethod = credinfo.policy.policyUpdate.UpdateMethod;
|
||||
mPreferredRoamingPartnerList = credinfo.policy.preferredRoamingPartnerList.values();
|
||||
mMinBackhaulThresholdNetwork = credinfo.policy.minBackhaulThreshold.values();
|
||||
mRequiredProtoPortTuple = credinfo.policy.requiredProtoPortTuple.values();
|
||||
mMaxBssLoad = credinfo.policy.maximumBSSLoadValue;
|
||||
mSpExclusionList = credinfo.policy.sPExclusionList.values();
|
||||
|
||||
mHomeOIList = credinfo.homeSP.homeOIList.values();
|
||||
mFriendlyName = credinfo.homeSP.FriendlyName;
|
||||
mCheckAaaServerCertStatus = credinfo.credential.CheckAAAServerCertStatus;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public WifiPasspointCredential(String type,
|
||||
String caroot,
|
||||
String clientcert,
|
||||
String mcc,
|
||||
String mnc,
|
||||
WifiPasspointDmTree.SpFqdn sp,
|
||||
WifiPasspointDmTree.CredentialInfo credinfo) {
|
||||
|
||||
if (credinfo == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
mType = type;
|
||||
mCaRootCert = caroot;
|
||||
mClientCert = clientcert;
|
||||
|
||||
mWifiSPFQDN = sp.nodeName;
|
||||
mUpdateIdentifier = sp.perProviderSubscription.UpdateIdentifier;
|
||||
|
||||
mCredentialName = credinfo.nodeName;
|
||||
Set set = credinfo.homeSP.otherHomePartners.entrySet();
|
||||
Iterator i = set.iterator();
|
||||
if (i.hasNext()) {
|
||||
Map.Entry entry3 = (Map.Entry) i.next();
|
||||
WifiPasspointDmTree.OtherHomePartners ohp = (WifiPasspointDmTree.OtherHomePartners) entry3.getValue();
|
||||
mOtherhomepartnerFqdn = ohp.FQDN;
|
||||
}
|
||||
|
||||
set = credinfo.aAAServerTrustRoot.entrySet();
|
||||
i = set.iterator();
|
||||
if (i.hasNext()) {
|
||||
Map.Entry entry3 = (Map.Entry) i.next();
|
||||
WifiPasspointDmTree.AAAServerTrustRoot aaa = (WifiPasspointDmTree.AAAServerTrustRoot) entry3.getValue();
|
||||
mAAACertURL = aaa.CertURL;
|
||||
mAAASha256Fingerprint = aaa.CertSHA256Fingerprint;
|
||||
}
|
||||
|
||||
mCertType = credinfo.credential.digitalCertificate.CertificateType;
|
||||
mCertSha256Fingerprint = credinfo.credential.digitalCertificate.CertSHA256Fingerprint;
|
||||
mUsername = credinfo.credential.usernamePassword.Username;
|
||||
mPasswd = credinfo.credential.usernamePassword.Password;
|
||||
mIsMachineRemediation = credinfo.credential.usernamePassword.MachineManaged;
|
||||
mInnerMethod = credinfo.credential.usernamePassword.eAPMethod.InnerMethod;
|
||||
mImsi = credinfo.credential.sim.IMSI;
|
||||
mMcc = mcc;
|
||||
mMnc = mnc;
|
||||
mCreationDate = credinfo.credential.CreationDate;
|
||||
mExpirationDate = credinfo.credential.ExpirationDate;
|
||||
mRealm = credinfo.credential.Realm;
|
||||
|
||||
if (credinfo.credentialPriority == null) {
|
||||
credinfo.credentialPriority = "128";
|
||||
}
|
||||
mPriority = Integer.parseInt(credinfo.credentialPriority);
|
||||
|
||||
mHomeSpFqdn = credinfo.homeSP.FQDN;
|
||||
|
||||
mSubscriptionUpdateMethod = credinfo.subscriptionUpdate.UpdateMethod;
|
||||
mSubscriptionUpdateRestriction = credinfo.subscriptionUpdate.Restriction;
|
||||
mSubscriptionUpdateURI = credinfo.subscriptionUpdate.URI;
|
||||
mSubscriptionDMAccUsername = credinfo.subscriptionUpdate.usernamePassword.Username;
|
||||
mSubscriptionDMAccPassword = credinfo.subscriptionUpdate.usernamePassword.Password;
|
||||
|
||||
mPolicyUpdateURI = credinfo.policy.policyUpdate.URI;
|
||||
mPolicyUpdateInterval = credinfo.policy.policyUpdate.UpdateInterval;
|
||||
mPolicyDMAccUsername = credinfo.policy.policyUpdate.usernamePassword.Username;
|
||||
mPolicyDMAccPassword = credinfo.policy.policyUpdate.usernamePassword.Password;
|
||||
mPolicyUpdateRestriction = credinfo.policy.policyUpdate.Restriction;
|
||||
mPolicyUpdateMethod = credinfo.policy.policyUpdate.UpdateMethod;
|
||||
mPreferredRoamingPartnerList = credinfo.policy.preferredRoamingPartnerList.values();
|
||||
mMinBackhaulThresholdNetwork = credinfo.policy.minBackhaulThreshold.values();
|
||||
mRequiredProtoPortTuple = credinfo.policy.requiredProtoPortTuple.values();
|
||||
mMaxBssLoad = credinfo.policy.maximumBSSLoadValue;
|
||||
mSpExclusionList = credinfo.policy.sPExclusionList.values();
|
||||
|
||||
mHomeOIList = credinfo.homeSP.homeOIList.values();
|
||||
mFriendlyName = credinfo.homeSP.FriendlyName;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public String getUpdateIdentifier() {
|
||||
return mUpdateIdentifier;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public String getUpdateMethod() {
|
||||
return mSubscriptionUpdateMethod;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public void setUpdateMethod(String method) {
|
||||
mSubscriptionUpdateMethod = method;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public String getWifiSPFQDN() {
|
||||
return mWifiSPFQDN;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public String getCredName() {
|
||||
return mCredentialName;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public String getEapMethodStr() {
|
||||
return mType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get EAP method of this Passpoint credential.
|
||||
* @return EAP method, refer to {@link WifiEnterpriseConfig.Eap} for possible return values
|
||||
*/
|
||||
public int getEapMethod() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public String getCertType() {
|
||||
return mCertType;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public String getCertSha256Fingerprint() {
|
||||
return mCertSha256Fingerprint;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the user name of this Passpoint credential, for EAP-TTLS only.
|
||||
* @return user name
|
||||
*/
|
||||
public String getUserName() {
|
||||
return mUsername;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public String getPassword() {
|
||||
// TODO: guarded by connectivity internal
|
||||
return mPasswd;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the IMSI of this Passpoint credential, for EAP-SIM / EAP-AKA only.
|
||||
* @return IMSI
|
||||
*/
|
||||
public String getImsi() {
|
||||
return mImsi;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public String getMcc() {
|
||||
return mMcc;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public String getMnc() {
|
||||
return mMnc;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public String getCaRootCert() {
|
||||
return mCaRootCert;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the client certificate path of this Passpoint credential, for EAP-TLS only.
|
||||
* @return client certificate path
|
||||
*/
|
||||
public String getClientCertPath() {
|
||||
return mClientCert;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the realm of this Passpoint credential, for all EAP methods.
|
||||
* @return Realm
|
||||
*/
|
||||
public String getRealm() {
|
||||
return mRealm;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public int getPriority() {
|
||||
if (mUserPreferred) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return mPriority;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the fully qualified domain name (FQDN) of this Passpoint credential,
|
||||
* for all EAP methods.
|
||||
* @return FQDN
|
||||
*/
|
||||
public String getFqdn() {
|
||||
return mHomeSpFqdn;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public String getOtherhomepartners() {
|
||||
return mOtherhomepartnerFqdn;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public String getSubscriptionDMAccUsername() {
|
||||
return mSubscriptionDMAccUsername;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public String getSubscriptionDMAccPassword() {
|
||||
return mSubscriptionDMAccPassword;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public String getPolicyUpdateURI() {
|
||||
return mPolicyUpdateURI;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public String getPolicyUpdateInterval() {
|
||||
return mPolicyUpdateInterval;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public String getPolicyDMAccUsername() {
|
||||
return mPolicyDMAccUsername;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public String getPolicyDMAccPassword() {
|
||||
return mPolicyDMAccPassword;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public String getPolicyUpdateRestriction() {
|
||||
return mPolicyUpdateRestriction;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public String getPolicyUpdateMethod() {
|
||||
return mPolicyUpdateMethod;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public String getCreationDate() {
|
||||
return mCreationDate;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public String getExpirationDate() {
|
||||
return mExpirationDate;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public void setExpirationDate(String expirationdate) {
|
||||
mExpirationDate = expirationdate;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public Collection<WifiPasspointDmTree.PreferredRoamingPartnerList> getPrpList() {
|
||||
return mPreferredRoamingPartnerList;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public Collection<WifiPasspointDmTree.HomeOIList> getHomeOIList() {
|
||||
return mHomeOIList;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public Collection<WifiPasspointDmTree.MinBackhaulThresholdNetwork> getBackhaulThresholdList() {
|
||||
return mMinBackhaulThresholdNetwork;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public Collection<WifiPasspointDmTree.RequiredProtoPortTuple> getRequiredProtoPortList() {
|
||||
return mRequiredProtoPortTuple;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public Collection<WifiPasspointDmTree.SPExclusionList> getSPExclusionList() {
|
||||
return mSpExclusionList;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public boolean getIsMachineRemediation() {
|
||||
return mIsMachineRemediation;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public String getAAACertURL() {
|
||||
return mAAACertURL;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public String getAAASha256Fingerprint() {
|
||||
return mAAASha256Fingerprint;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public String getSubscriptionUpdateRestriction() {
|
||||
return mSubscriptionUpdateRestriction;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public String getSubscriptionUpdateURI() {
|
||||
return mSubscriptionUpdateURI;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public String getSubscriptionUpdateInterval() {
|
||||
return mSubscriptionUpdateInterval;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public String getFriendlyName() {
|
||||
return mFriendlyName;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public String getMaxBssLoad() {
|
||||
return mMaxBssLoad;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public boolean getUserPreference() {
|
||||
return mUserPreferred;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public boolean getCheckAaaServerCertStatus() {
|
||||
return mCheckAaaServerCertStatus;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public void setUserPreference(boolean value) {
|
||||
mUserPreferred = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
/** @hide */
|
||||
public boolean equals(Object obj) {
|
||||
boolean result = false;
|
||||
if (obj instanceof WifiPasspointCredential) {
|
||||
final WifiPasspointCredential other = (WifiPasspointCredential) obj;
|
||||
if (this.mType.equals(other.mType)) {
|
||||
if (this.mType.equals("TTLS")) {
|
||||
result = this.mUsername.equals(other.mUsername) &&
|
||||
this.mPasswd.equals(other.mPasswd) &&
|
||||
this.mRealm.equals(other.mRealm) &&
|
||||
this.mHomeSpFqdn.equals(other.mHomeSpFqdn);
|
||||
}
|
||||
if (this.mType.equals("TLS")) {
|
||||
result = this.mRealm.equals(other.mRealm) &&
|
||||
this.mHomeSpFqdn.equals(other.mHomeSpFqdn);
|
||||
}
|
||||
if (this.mType.equals("SIM")) {
|
||||
result = this.mMcc.equals(other.mMcc) &&
|
||||
this.mMnc.equals(other.mMnc) &&
|
||||
this.mImsi.equals(other.mImsi) &&
|
||||
this.mHomeSpFqdn.equals(other.mHomeSpFqdn);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
/** @hide */
|
||||
public String toString() {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
String none = "<none>";
|
||||
|
||||
sb.append(", UpdateIdentifier: ")
|
||||
.append(mUpdateIdentifier == null ? none : mUpdateIdentifier).
|
||||
append(", SubscriptionUpdateMethod: ")
|
||||
.append(mSubscriptionUpdateMethod == null ? none : mSubscriptionUpdateMethod).
|
||||
append(", Type: ").append(mType == null ? none : mType).
|
||||
append(", Username: ").append(mUsername == null ? none : mUsername).
|
||||
append(", Passwd: ").append(mPasswd == null ? none : mPasswd).
|
||||
append(", SubDMAccUsername: ")
|
||||
.append(mSubscriptionDMAccUsername == null ? none : mSubscriptionDMAccUsername).
|
||||
append(", SubDMAccPassword: ")
|
||||
.append(mSubscriptionDMAccPassword == null ? none : mSubscriptionDMAccPassword).
|
||||
append(", PolDMAccUsername: ")
|
||||
.append(mPolicyDMAccUsername == null ? none : mPolicyDMAccUsername).
|
||||
append(", PolDMAccPassword: ")
|
||||
.append(mPolicyDMAccPassword == null ? none : mPolicyDMAccPassword).
|
||||
append(", Imsi: ").append(mImsi == null ? none : mImsi).
|
||||
append(", Mcc: ").append(mMcc == null ? none : mMcc).
|
||||
append(", Mnc: ").append(mMnc == null ? none : mMnc).
|
||||
append(", CaRootCert: ").append(mCaRootCert == null ? none : mCaRootCert).
|
||||
append(", Realm: ").append(mRealm == null ? none : mRealm).
|
||||
append(", Priority: ").append(mPriority).
|
||||
append(", Fqdn: ").append(mHomeSpFqdn == null ? none : mHomeSpFqdn).
|
||||
append(", Otherhomepartners: ")
|
||||
.append(mOtherhomepartnerFqdn == null ? none : mOtherhomepartnerFqdn).
|
||||
append(", ExpirationDate: ")
|
||||
.append(mExpirationDate == null ? none : mExpirationDate).
|
||||
append(", MaxBssLoad: ").append(mMaxBssLoad == null ? none : mMaxBssLoad).
|
||||
append(", SPExclusionList: ").append(mSpExclusionList);
|
||||
|
||||
if (mPreferredRoamingPartnerList != null) {
|
||||
sb.append("PreferredRoamingPartnerList:");
|
||||
for (WifiPasspointDmTree.PreferredRoamingPartnerList prpListItem : mPreferredRoamingPartnerList) {
|
||||
sb.append("[fqdnmatch:").append(prpListItem.FQDN_Match).
|
||||
append(", priority:").append(prpListItem.Priority).
|
||||
append(", country:").append(prpListItem.Country).append("]");
|
||||
}
|
||||
}
|
||||
|
||||
if (mHomeOIList != null) {
|
||||
sb.append("HomeOIList:");
|
||||
for (WifiPasspointDmTree.HomeOIList HomeOIListItem : mHomeOIList) {
|
||||
sb.append("[HomeOI:").append(HomeOIListItem.HomeOI).
|
||||
append(", HomeOIRequired:").append(HomeOIListItem.HomeOIRequired).
|
||||
append("]");
|
||||
}
|
||||
}
|
||||
|
||||
if (mMinBackhaulThresholdNetwork != null) {
|
||||
sb.append("BackHaulThreshold:");
|
||||
for (WifiPasspointDmTree.MinBackhaulThresholdNetwork BhtListItem : mMinBackhaulThresholdNetwork) {
|
||||
sb.append("[networkType:").append(BhtListItem.NetworkType).
|
||||
append(", dlBandwidth:").append(BhtListItem.DLBandwidth).
|
||||
append(", ulBandwidth:").append(BhtListItem.ULBandwidth).
|
||||
append("]");
|
||||
}
|
||||
}
|
||||
|
||||
if (mRequiredProtoPortTuple != null) {
|
||||
sb.append("WifiMORequiredProtoPortTupleList:");
|
||||
for (WifiPasspointDmTree.RequiredProtoPortTuple RpptListItem : mRequiredProtoPortTuple) {
|
||||
sb.append("[IPProtocol:").append(RpptListItem.IPProtocol).
|
||||
append(", PortNumber:").append(RpptListItem.PortNumber).
|
||||
append("]");
|
||||
}
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/** Implement the Parcelable interface {@hide} */
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** Implement the Parcelable interface {@hide} */
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeString(mType);
|
||||
dest.writeString(mUsername);
|
||||
dest.writeString(mPasswd);
|
||||
dest.writeString(mImsi);
|
||||
dest.writeString(mMcc);
|
||||
dest.writeString(mMnc);
|
||||
dest.writeString(mCaRootCert);
|
||||
dest.writeString(mRealm);
|
||||
dest.writeInt(mPriority);
|
||||
dest.writeString(mHomeSpFqdn);
|
||||
dest.writeString(mOtherhomepartnerFqdn);
|
||||
dest.writeString(mClientCert);
|
||||
dest.writeString(mExpirationDate);
|
||||
}
|
||||
|
||||
/** Implement the Parcelable interface {@hide} */
|
||||
public static final Creator<WifiPasspointCredential> CREATOR =
|
||||
new Creator<WifiPasspointCredential>() {
|
||||
public WifiPasspointCredential createFromParcel(Parcel in) {
|
||||
WifiPasspointCredential pc = new WifiPasspointCredential();
|
||||
pc.mType = in.readString();
|
||||
pc.mUsername = in.readString();
|
||||
pc.mPasswd = in.readString();
|
||||
pc.mImsi = in.readString();
|
||||
pc.mMcc = in.readString();
|
||||
pc.mMnc = in.readString();
|
||||
pc.mCaRootCert = in.readString();
|
||||
pc.mRealm = in.readString();
|
||||
pc.mPriority = in.readInt();
|
||||
pc.mHomeSpFqdn = in.readString();
|
||||
pc.mOtherhomepartnerFqdn = in.readString();
|
||||
pc.mClientCert = in.readString();
|
||||
pc.mExpirationDate = in.readString();
|
||||
return pc;
|
||||
}
|
||||
|
||||
public WifiPasspointCredential[] newArray(int size) {
|
||||
return new WifiPasspointCredential[size];
|
||||
}
|
||||
};
|
||||
|
||||
/** @hide */
|
||||
public int compareTo(WifiPasspointCredential another) {
|
||||
|
||||
//The smaller the higher
|
||||
if (mPriority < another.mPriority) {
|
||||
return -1;
|
||||
} else if (mPriority == another.mPriority) {
|
||||
return this.mType.compareTo(another.mType);
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
/** @hide */
|
||||
public int hashCode() {
|
||||
int hash = 208;
|
||||
if (mType != null) {
|
||||
hash += mType.hashCode();
|
||||
}
|
||||
if (mRealm != null) {
|
||||
hash += mRealm.hashCode();
|
||||
}
|
||||
if (mHomeSpFqdn != null) {
|
||||
hash += mHomeSpFqdn.hashCode();
|
||||
}
|
||||
if (mUsername != null) {
|
||||
hash += mUsername.hashCode();
|
||||
}
|
||||
if (mPasswd != null) {
|
||||
hash += mPasswd.hashCode();
|
||||
}
|
||||
|
||||
return hash;
|
||||
}
|
||||
}
|
||||
@@ -16,4 +16,4 @@
|
||||
|
||||
package android.net.wifi.passpoint;
|
||||
|
||||
parcelable PasspointCredential;
|
||||
parcelable WifiPasspointDmTree;
|
||||
1379
wifi/java/android/net/wifi/passpoint/WifiPasspointDmTree.java
Normal file
1379
wifi/java/android/net/wifi/passpoint/WifiPasspointDmTree.java
Normal file
File diff suppressed because it is too large
Load Diff
@@ -16,4 +16,4 @@
|
||||
|
||||
package android.net.wifi.passpoint;
|
||||
|
||||
parcelable PasspointPolicy;
|
||||
parcelable WifiPasspointInfo;
|
||||
@@ -22,74 +22,71 @@ import android.os.Parcelable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* TODO: doc
|
||||
*/
|
||||
public class PasspointInfo implements Parcelable {
|
||||
/** @hide */
|
||||
public class WifiPasspointInfo implements Parcelable {
|
||||
|
||||
/** TODO doc */
|
||||
public static final int ANQP_CAPABILITY = 1 << 0;
|
||||
public static final int ANQP_CAPABILITY = 1 << 0;
|
||||
|
||||
/** TODO doc */
|
||||
public static final int VENUE_NAME = 1 << 1;
|
||||
public static final int VENUE_NAME = 1 << 1;
|
||||
|
||||
/** TODO doc */
|
||||
public static final int NETWORK_AUTH_TYPE = 1 << 2;
|
||||
public static final int NETWORK_AUTH_TYPE = 1 << 2;
|
||||
|
||||
/** TODO doc */
|
||||
public static final int ROAMING_CONSORTIUM = 1 << 3;
|
||||
public static final int ROAMING_CONSORTIUM = 1 << 3;
|
||||
|
||||
/** TODO doc */
|
||||
public static final int IP_ADDR_TYPE_AVAILABILITY = 1 << 4;
|
||||
public static final int IP_ADDR_TYPE_AVAILABILITY = 1 << 4;
|
||||
|
||||
/** TODO doc */
|
||||
public static final int NAI_REALM = 1 << 5;
|
||||
public static final int NAI_REALM = 1 << 5;
|
||||
|
||||
/** TODO doc */
|
||||
public static final int CELLULAR_NETWORK = 1 << 6;
|
||||
public static final int CELLULAR_NETWORK = 1 << 6;
|
||||
|
||||
/** TODO doc */
|
||||
public static final int DOMAIN_NAME = 1 << 7;
|
||||
public static final int DOMAIN_NAME = 1 << 7;
|
||||
|
||||
/** TODO doc */
|
||||
public static final int HOTSPOT_CAPABILITY = 1 << 8;
|
||||
public static final int HOTSPOT_CAPABILITY = 1 << 8;
|
||||
|
||||
/** TODO doc */
|
||||
public static final int OPERATOR_FRIENDLY_NAME = 1 << 9;
|
||||
public static final int OPERATOR_FRIENDLY_NAME = 1 << 9;
|
||||
|
||||
/** TODO doc */
|
||||
public static final int WAN_METRICS = 1 << 10;
|
||||
public static final int WAN_METRICS = 1 << 10;
|
||||
|
||||
/** TODO doc */
|
||||
public static final int CONNECTION_CAPABILITY = 1 << 11;
|
||||
public static final int CONNECTION_CAPABILITY = 1 << 11;
|
||||
|
||||
/** TODO doc */
|
||||
public static final int OSU_PROVIDER = 1 << 12;
|
||||
public static final int OSU_PROVIDER = 1 << 12;
|
||||
|
||||
/** TODO doc */
|
||||
public static final int PRESET_CRED_MATCH =
|
||||
ANQP_CAPABILITY |
|
||||
HOTSPOT_CAPABILITY |
|
||||
NAI_REALM |
|
||||
CELLULAR_NETWORK |
|
||||
DOMAIN_NAME;
|
||||
HOTSPOT_CAPABILITY |
|
||||
NAI_REALM |
|
||||
CELLULAR_NETWORK |
|
||||
DOMAIN_NAME;
|
||||
|
||||
/** TODO doc */
|
||||
public static final int PRESET_ALL =
|
||||
ANQP_CAPABILITY |
|
||||
VENUE_NAME |
|
||||
NETWORK_AUTH_TYPE |
|
||||
ROAMING_CONSORTIUM |
|
||||
IP_ADDR_TYPE_AVAILABILITY |
|
||||
NAI_REALM |
|
||||
CELLULAR_NETWORK |
|
||||
DOMAIN_NAME |
|
||||
HOTSPOT_CAPABILITY |
|
||||
OPERATOR_FRIENDLY_NAME |
|
||||
WAN_METRICS |
|
||||
CONNECTION_CAPABILITY |
|
||||
OSU_PROVIDER;
|
||||
|
||||
VENUE_NAME |
|
||||
NETWORK_AUTH_TYPE |
|
||||
ROAMING_CONSORTIUM |
|
||||
IP_ADDR_TYPE_AVAILABILITY |
|
||||
NAI_REALM |
|
||||
CELLULAR_NETWORK |
|
||||
DOMAIN_NAME |
|
||||
HOTSPOT_CAPABILITY |
|
||||
OPERATOR_FRIENDLY_NAME |
|
||||
WAN_METRICS |
|
||||
CONNECTION_CAPABILITY |
|
||||
OSU_PROVIDER;
|
||||
|
||||
/** TODO doc */
|
||||
public String bssid;
|
||||
@@ -125,16 +122,15 @@ public class PasspointInfo implements Parcelable {
|
||||
public String connectionCapability;
|
||||
|
||||
/** TODO doc */
|
||||
public List<PasspointOsuProvider> osuProviderList;
|
||||
|
||||
public List<WifiPasspointOsuProvider> osuProviderList;
|
||||
|
||||
/** default constructor @hide */
|
||||
public PasspointInfo() {
|
||||
// osuProviderList = new ArrayList<OsuProvider>();
|
||||
public WifiPasspointInfo() {
|
||||
// osuProviderList = new ArrayList<OsuProvider>();
|
||||
}
|
||||
|
||||
/** copy constructor @hide */
|
||||
public PasspointInfo(PasspointInfo source) {
|
||||
public WifiPasspointInfo(WifiPasspointInfo source) {
|
||||
// TODO
|
||||
bssid = source.bssid;
|
||||
venueName = source.venueName;
|
||||
@@ -148,9 +144,9 @@ public class PasspointInfo implements Parcelable {
|
||||
wanMetrics = source.wanMetrics;
|
||||
connectionCapability = source.connectionCapability;
|
||||
if (source.osuProviderList != null) {
|
||||
osuProviderList = new ArrayList<PasspointOsuProvider>();
|
||||
for (PasspointOsuProvider osu : source.osuProviderList)
|
||||
osuProviderList.add(new PasspointOsuProvider(osu));
|
||||
osuProviderList = new ArrayList<WifiPasspointOsuProvider>();
|
||||
for (WifiPasspointOsuProvider osu : source.osuProviderList)
|
||||
osuProviderList.add(new WifiPasspointOsuProvider(osu));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,20 +159,34 @@ public class PasspointInfo implements Parcelable {
|
||||
*/
|
||||
public static String toAnqpSubtypes(int mask) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if ((mask & ANQP_CAPABILITY) != 0) sb.append("257,");
|
||||
if ((mask & VENUE_NAME) != 0) sb.append("258,");
|
||||
if ((mask & NETWORK_AUTH_TYPE) != 0) sb.append("260,");
|
||||
if ((mask & ROAMING_CONSORTIUM) != 0) sb.append("261,");
|
||||
if ((mask & IP_ADDR_TYPE_AVAILABILITY) != 0) sb.append("262,");
|
||||
if ((mask & NAI_REALM) != 0) sb.append("263,");
|
||||
if ((mask & CELLULAR_NETWORK) != 0) sb.append("264,");
|
||||
if ((mask & DOMAIN_NAME) != 0) sb.append("268,");
|
||||
if ((mask & HOTSPOT_CAPABILITY) != 0) sb.append("hs20:2,");
|
||||
if ((mask & OPERATOR_FRIENDLY_NAME) != 0) sb.append("hs20:3,");
|
||||
if ((mask & WAN_METRICS) != 0) sb.append("hs20:4,");
|
||||
if ((mask & CONNECTION_CAPABILITY) != 0) sb.append("hs20:5,");
|
||||
if ((mask & OSU_PROVIDER) != 0) sb.append("hs20:8,");
|
||||
if (sb.length() > 0) sb.deleteCharAt(sb.length() - 1);
|
||||
if ((mask & ANQP_CAPABILITY) != 0)
|
||||
sb.append("257,");
|
||||
if ((mask & VENUE_NAME) != 0)
|
||||
sb.append("258,");
|
||||
if ((mask & NETWORK_AUTH_TYPE) != 0)
|
||||
sb.append("260,");
|
||||
if ((mask & ROAMING_CONSORTIUM) != 0)
|
||||
sb.append("261,");
|
||||
if ((mask & IP_ADDR_TYPE_AVAILABILITY) != 0)
|
||||
sb.append("262,");
|
||||
if ((mask & NAI_REALM) != 0)
|
||||
sb.append("263,");
|
||||
if ((mask & CELLULAR_NETWORK) != 0)
|
||||
sb.append("264,");
|
||||
if ((mask & DOMAIN_NAME) != 0)
|
||||
sb.append("268,");
|
||||
if ((mask & HOTSPOT_CAPABILITY) != 0)
|
||||
sb.append("hs20:2,");
|
||||
if ((mask & OPERATOR_FRIENDLY_NAME) != 0)
|
||||
sb.append("hs20:3,");
|
||||
if ((mask & WAN_METRICS) != 0)
|
||||
sb.append("hs20:4,");
|
||||
if ((mask & CONNECTION_CAPABILITY) != 0)
|
||||
sb.append("hs20:5,");
|
||||
if ((mask & OSU_PROVIDER) != 0)
|
||||
sb.append("hs20:8,");
|
||||
if (sb.length() > 0)
|
||||
sb.deleteCharAt(sb.length() - 1);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@@ -227,7 +237,7 @@ public class PasspointInfo implements Parcelable {
|
||||
out.writeInt(0);
|
||||
} else {
|
||||
out.writeInt(osuProviderList.size());
|
||||
for (PasspointOsuProvider osu : osuProviderList)
|
||||
for (WifiPasspointOsuProvider osu : osuProviderList)
|
||||
osu.writeToParcel(out, flags);
|
||||
}
|
||||
}
|
||||
@@ -239,36 +249,37 @@ public class PasspointInfo implements Parcelable {
|
||||
}
|
||||
|
||||
/** Implement the Parcelable interface {@hide} */
|
||||
public static final Parcelable.Creator<PasspointInfo> CREATOR =
|
||||
new Parcelable.Creator<PasspointInfo>() {
|
||||
@Override
|
||||
public PasspointInfo createFromParcel(Parcel in) {
|
||||
PasspointInfo p = new PasspointInfo();
|
||||
p.bssid = (String) in.readValue(String.class.getClassLoader());
|
||||
p.venueName = (String) in.readValue(String.class.getClassLoader());
|
||||
p.networkAuthType = (String) in.readValue(String.class.getClassLoader());
|
||||
p.roamingConsortium = (String) in.readValue(String.class.getClassLoader());
|
||||
p.ipAddrTypeAvaibility = (String) in.readValue(String.class.getClassLoader());
|
||||
p.naiRealm = (String) in.readValue(String.class.getClassLoader());
|
||||
p.cellularNetwork = (String) in.readValue(String.class.getClassLoader());
|
||||
p.domainName = (String) in.readValue(String.class.getClassLoader());
|
||||
p.operatorFriendlyName = (String) in.readValue(String.class.getClassLoader());
|
||||
p.wanMetrics = (String) in.readValue(String.class.getClassLoader());
|
||||
p.connectionCapability = (String) in.readValue(String.class.getClassLoader());
|
||||
int n = in.readInt();
|
||||
if (n > 0) {
|
||||
p.osuProviderList = new ArrayList<PasspointOsuProvider>();
|
||||
for (int i = 0; i < n; i++) {
|
||||
PasspointOsuProvider osu = PasspointOsuProvider.CREATOR.createFromParcel(in);
|
||||
p.osuProviderList.add(osu);
|
||||
public static final Parcelable.Creator<WifiPasspointInfo> CREATOR =
|
||||
new Parcelable.Creator<WifiPasspointInfo>() {
|
||||
@Override
|
||||
public WifiPasspointInfo createFromParcel(Parcel in) {
|
||||
WifiPasspointInfo p = new WifiPasspointInfo();
|
||||
p.bssid = (String) in.readValue(String.class.getClassLoader());
|
||||
p.venueName = (String) in.readValue(String.class.getClassLoader());
|
||||
p.networkAuthType = (String) in.readValue(String.class.getClassLoader());
|
||||
p.roamingConsortium = (String) in.readValue(String.class.getClassLoader());
|
||||
p.ipAddrTypeAvaibility = (String) in.readValue(String.class.getClassLoader());
|
||||
p.naiRealm = (String) in.readValue(String.class.getClassLoader());
|
||||
p.cellularNetwork = (String) in.readValue(String.class.getClassLoader());
|
||||
p.domainName = (String) in.readValue(String.class.getClassLoader());
|
||||
p.operatorFriendlyName = (String) in.readValue(String.class.getClassLoader());
|
||||
p.wanMetrics = (String) in.readValue(String.class.getClassLoader());
|
||||
p.connectionCapability = (String) in.readValue(String.class.getClassLoader());
|
||||
int n = in.readInt();
|
||||
if (n > 0) {
|
||||
p.osuProviderList = new ArrayList<WifiPasspointOsuProvider>();
|
||||
for (int i = 0; i < n; i++) {
|
||||
WifiPasspointOsuProvider osu = WifiPasspointOsuProvider.CREATOR
|
||||
.createFromParcel(in);
|
||||
p.osuProviderList.add(osu);
|
||||
}
|
||||
}
|
||||
return p;
|
||||
}
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PasspointInfo[] newArray(int size) {
|
||||
return new PasspointInfo[size];
|
||||
}
|
||||
};
|
||||
@Override
|
||||
public WifiPasspointInfo[] newArray(int size) {
|
||||
return new WifiPasspointInfo[size];
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -34,9 +34,9 @@ import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* TODO: doc
|
||||
* Provides APIs for managing Wifi Passpoint credentials.
|
||||
*/
|
||||
public class PasspointManager {
|
||||
public class WifiPasspointManager {
|
||||
|
||||
private static final String TAG = "PasspointManager";
|
||||
|
||||
@@ -44,37 +44,58 @@ public class PasspointManager {
|
||||
|
||||
/* Passpoint states values */
|
||||
|
||||
/** Passpoint is in an known state. This should only occur in boot time */
|
||||
public static final int PASSPOINT_STATE_UNKNOWN = 0;
|
||||
/** Passpoint is in an known state. This should only occur in boot time @hide */
|
||||
public static final int PASSPOINT_STATE_UNKNOWN = 0;
|
||||
|
||||
/** Passpoint is disabled. This occurs when wifi is disabled. */
|
||||
public static final int PASSPOINT_STATE_DISABLED = 1;
|
||||
/** Passpoint is disabled. This occurs when wifi is disabled. @hide */
|
||||
public static final int PASSPOINT_STATE_DISABLED = 1;
|
||||
|
||||
/** Passpoint is enabled and in discovery state. */
|
||||
public static final int PASSPOINT_STATE_DISCOVERY = 2;
|
||||
/** Passpoint is enabled and in discovery state. @hide */
|
||||
public static final int PASSPOINT_STATE_DISCOVERY = 2;
|
||||
|
||||
/** Passpoint is enabled and in access state. */
|
||||
public static final int PASSPOINT_STATE_ACCESS = 3;
|
||||
/** Passpoint is enabled and in access state. @hide */
|
||||
public static final int PASSPOINT_STATE_ACCESS = 3;
|
||||
|
||||
/** Passpoint is enabled and in provisioning state. */
|
||||
public static final int PASSPOINT_STATE_PROVISION = 4;
|
||||
/** Passpoint is enabled and in provisioning state. @hide */
|
||||
public static final int PASSPOINT_STATE_PROVISION = 4;
|
||||
|
||||
/* Passpoint callback error codes */
|
||||
|
||||
/** Indicates that the operation failed due to an internal error */
|
||||
public static final int ERROR = 0;
|
||||
/** Indicates that the operation failed due to an internal error @hide */
|
||||
public static final int ERROR = 0;
|
||||
|
||||
/** Indicates that the operation failed because wifi is disabled */
|
||||
public static final int WIFI_DISABLED = 1;
|
||||
/** Indicates that the operation failed because wifi is disabled @hide */
|
||||
public static final int WIFI_DISABLED = 1;
|
||||
|
||||
/** Indicates that the operation failed because the framework is busy */
|
||||
public static final int BUSY = 2;
|
||||
/** Indicates that the operation failed because the framework is busy @hide */
|
||||
public static final int BUSY = 2;
|
||||
|
||||
/**
|
||||
* protocol supported for Passpoint
|
||||
* @hide
|
||||
*/
|
||||
public static final String PROTOCOL_DM = "OMA-DM-ClientInitiated";
|
||||
|
||||
/**
|
||||
* protocol supported for Passpoint
|
||||
* @hide
|
||||
*/
|
||||
public static final String PROTOCOL_SOAP = "SPP-ClientInitiated";
|
||||
|
||||
/* Passpoint broadcasts */
|
||||
|
||||
/**
|
||||
* Broadcast intent action indicating that Passpoint online sign up is
|
||||
* avaiable.
|
||||
* @hide
|
||||
*/
|
||||
public static final String PASSPOINT_OSU_AVAILABLE =
|
||||
"android.net.wifi.passpoint.OSU_AVAILABLE";
|
||||
|
||||
/**
|
||||
* Broadcast intent action indicating that the state of Passpoint
|
||||
* connectivity has changed
|
||||
* @hide
|
||||
*/
|
||||
public static final String PASSPOINT_STATE_CHANGED_ACTION =
|
||||
"android.net.wifi.passpoint.STATE_CHANGE";
|
||||
@@ -82,6 +103,7 @@ public class PasspointManager {
|
||||
/**
|
||||
* Broadcast intent action indicating that the saved Passpoint credential
|
||||
* list has changed
|
||||
* @hide
|
||||
*/
|
||||
public static final String PASSPOINT_CRED_CHANGED_ACTION =
|
||||
"android.net.wifi.passpoint.CRED_CHANGE";
|
||||
@@ -101,9 +123,9 @@ public class PasspointManager {
|
||||
public static final String PASSPOINT_USER_REM_REQ_ACTION =
|
||||
"android.net.wifi.passpoint.USER_REM_REQ";
|
||||
|
||||
|
||||
/**
|
||||
* Interface for callback invocation when framework channel is lost
|
||||
* @hide
|
||||
*/
|
||||
public interface ChannelListener {
|
||||
/**
|
||||
@@ -115,6 +137,7 @@ public class PasspointManager {
|
||||
|
||||
/**
|
||||
* Interface for callback invocation on an application action
|
||||
* @hide
|
||||
*/
|
||||
public interface ActionListener {
|
||||
/** The operation succeeded */
|
||||
@@ -163,6 +186,7 @@ public class PasspointManager {
|
||||
* A channel that connects the application to the wifi passpoint framework.
|
||||
* Most passpoint operations require a Channel as an argument.
|
||||
* An instance of Channel is obtained by doing a call on {@link #initialize}
|
||||
* @hide
|
||||
*/
|
||||
public static class Channel {
|
||||
private final static int INVALID_LISTENER_KEY = 0;
|
||||
@@ -193,7 +217,8 @@ public class PasspointManager {
|
||||
}
|
||||
|
||||
private int putListener(Object listener, int count) {
|
||||
if (listener == null || count <= 0) return INVALID_LISTENER_KEY;
|
||||
if (listener == null || count <= 0)
|
||||
return INVALID_LISTENER_KEY;
|
||||
int key;
|
||||
synchronized (mListenerMapLock) {
|
||||
do {
|
||||
@@ -207,13 +232,15 @@ public class PasspointManager {
|
||||
|
||||
private Object getListener(int key, boolean force) {
|
||||
Log.d(TAG, "getListener() key=" + key + " force=" + force);
|
||||
if (key == INVALID_LISTENER_KEY) return null;
|
||||
if (key == INVALID_LISTENER_KEY)
|
||||
return null;
|
||||
synchronized (mListenerMapLock) {
|
||||
if (!force) {
|
||||
int count = mListenerMapCount.get(key);
|
||||
Log.d(TAG, "count=" + count);
|
||||
mListenerMapCount.put(key, --count);
|
||||
if (count > 0) return null;
|
||||
if (count > 0)
|
||||
return null;
|
||||
}
|
||||
Log.d(TAG, "remove key");
|
||||
mListenerMapCount.remove(key);
|
||||
@@ -223,12 +250,14 @@ public class PasspointManager {
|
||||
|
||||
private void anqpRequestStart(ScanResult sr) {
|
||||
Log.d(TAG, "anqpRequestStart sr.bssid=" + sr.BSSID);
|
||||
synchronized(mAnqpRequestLock) { mAnqpRequest.add(sr); }
|
||||
synchronized (mAnqpRequestLock) {
|
||||
mAnqpRequest.add(sr);
|
||||
}
|
||||
}
|
||||
|
||||
private void anqpRequestFinish(PasspointInfo result) {
|
||||
private void anqpRequestFinish(WifiPasspointInfo result) {
|
||||
Log.d(TAG, "anqpRequestFinish pi.bssid=" + result.bssid);
|
||||
synchronized(mAnqpRequestLock) {
|
||||
synchronized (mAnqpRequestLock) {
|
||||
for (ScanResult sr : mAnqpRequest)
|
||||
if (sr.BSSID.equals(result.bssid)) {
|
||||
Log.d(TAG, "find hit " + result.bssid);
|
||||
@@ -242,7 +271,7 @@ public class PasspointManager {
|
||||
|
||||
private void anqpRequestFinish(ScanResult sr) {
|
||||
Log.d(TAG, "anqpRequestFinish sr.bssid=" + sr.BSSID);
|
||||
synchronized(mAnqpRequestLock) {
|
||||
synchronized (mAnqpRequestLock) {
|
||||
for (ScanResult sr1 : mAnqpRequest)
|
||||
if (sr1.BSSID.equals(sr.BSSID)) {
|
||||
mAnqpRequest.remove(sr1);
|
||||
@@ -268,7 +297,7 @@ public class PasspointManager {
|
||||
break;
|
||||
|
||||
case REQUEST_ANQP_INFO_SUCCEEDED:
|
||||
PasspointInfo result = (PasspointInfo) message.obj;
|
||||
WifiPasspointInfo result = (WifiPasspointInfo) message.obj;
|
||||
anqpRequestFinish(result);
|
||||
if (listener != null) {
|
||||
((ActionListener) listener).onSuccess();
|
||||
@@ -277,7 +306,8 @@ public class PasspointManager {
|
||||
|
||||
case REQUEST_ANQP_INFO_FAILED:
|
||||
anqpRequestFinish((ScanResult) message.obj);
|
||||
if (listener == null) getListener(message.arg2, true);
|
||||
if (listener == null)
|
||||
getListener(message.arg2, true);
|
||||
if (listener != null) {
|
||||
((ActionListener) listener).onFailure(message.arg1);
|
||||
}
|
||||
@@ -292,38 +322,36 @@ public class PasspointManager {
|
||||
|
||||
}
|
||||
|
||||
|
||||
private static final int BASE = Protocol.BASE_WIFI_PASSPOINT_MANAGER;
|
||||
|
||||
/** @hide */
|
||||
public static final int REQUEST_ANQP_INFO = BASE + 1;
|
||||
public static final int REQUEST_ANQP_INFO = BASE + 1;
|
||||
|
||||
/** @hide */
|
||||
public static final int REQUEST_ANQP_INFO_FAILED = BASE + 2;
|
||||
public static final int REQUEST_ANQP_INFO_FAILED = BASE + 2;
|
||||
|
||||
/** @hide */
|
||||
public static final int REQUEST_ANQP_INFO_SUCCEEDED = BASE + 3;
|
||||
public static final int REQUEST_ANQP_INFO_SUCCEEDED = BASE + 3;
|
||||
|
||||
/** @hide */
|
||||
public static final int REQUEST_OSU_INFO = BASE + 4;
|
||||
public static final int REQUEST_OSU_INFO = BASE + 4;
|
||||
|
||||
/** @hide */
|
||||
public static final int REQUEST_OSU_INFO_FAILED = BASE + 5;
|
||||
public static final int REQUEST_OSU_INFO_FAILED = BASE + 5;
|
||||
|
||||
/** @hide */
|
||||
public static final int REQUEST_OSU_INFO_SUCCEEDED = BASE + 6;
|
||||
|
||||
public static final int REQUEST_OSU_INFO_SUCCEEDED = BASE + 6;
|
||||
|
||||
private Context mContext;
|
||||
IPasspointManager mService;
|
||||
|
||||
IWifiPasspointManager mService;
|
||||
|
||||
/**
|
||||
* TODO: doc
|
||||
* @param context
|
||||
* @param service
|
||||
* @hide
|
||||
*/
|
||||
public PasspointManager(Context context, IPasspointManager service) {
|
||||
public WifiPasspointManager(Context context, IWifiPasspointManager service) {
|
||||
mContext = context;
|
||||
mService = service;
|
||||
}
|
||||
@@ -338,10 +366,13 @@ public class PasspointManager {
|
||||
* null.
|
||||
* @return Channel instance that is necessary for performing any further
|
||||
* passpoint operations
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public Channel initialize(Context srcContext, Looper srcLooper, ChannelListener listener) {
|
||||
Messenger messenger = getMessenger();
|
||||
if (messenger == null) return null;
|
||||
if (messenger == null)
|
||||
return null;
|
||||
|
||||
Channel c = new Channel(srcContext, srcLooper, listener);
|
||||
if (c.mAsyncChannel.connectSync(srcContext, c.mHandler, messenger)
|
||||
@@ -366,49 +397,33 @@ public class PasspointManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Passpoint state.
|
||||
*
|
||||
* @return One of {@link #PASSPOINT_STATE_DISABLED},
|
||||
* {@link #PASSPOINT_STATE_DISCOVERY},
|
||||
* {@link #PASSPOINT_STATE_ACCESS},
|
||||
* {@link #PASSPOINT_STATE_PROVISION},
|
||||
* {@link #PASSPOINT_STATE_UNKNOWN}
|
||||
*/
|
||||
/** @hide */
|
||||
public int getPasspointState() {
|
||||
try{
|
||||
try {
|
||||
return mService.getPasspointState();
|
||||
}
|
||||
catch (RemoteException e) {
|
||||
} catch (RemoteException e) {
|
||||
return PASSPOINT_STATE_UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO: doc
|
||||
*
|
||||
* @param c
|
||||
* @param requested
|
||||
* @param mask
|
||||
* @param listener
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
/** @hide */
|
||||
public void requestAnqpInfo(Channel c, List<ScanResult> requested, int mask,
|
||||
ActionListener listener) {
|
||||
Log.d(TAG, "requestAnqpInfo start");
|
||||
Log.d(TAG, "requested.size=" + requested.size());
|
||||
checkChannel(c);
|
||||
List<ScanResult> list = new ArrayList<ScanResult>();
|
||||
for (ScanResult sr : requested) if (sr.capabilities.contains("[HS20]")) {
|
||||
list.add(sr);
|
||||
c.anqpRequestStart(sr);
|
||||
Log.d(TAG, "adding " + sr.BSSID);
|
||||
}
|
||||
for (ScanResult sr : requested)
|
||||
if (sr.capabilities.contains("[HS20]")) {
|
||||
list.add(sr);
|
||||
c.anqpRequestStart(sr);
|
||||
Log.d(TAG, "adding " + sr.BSSID);
|
||||
}
|
||||
int count = list.size();
|
||||
Log.d(TAG, "after filter, count=" + count);
|
||||
if (count == 0) {
|
||||
if (DBG) Log.d(TAG, "ANQP info request contains no HS20 APs, skipped");
|
||||
if (DBG)
|
||||
Log.d(TAG, "ANQP info request contains no HS20 APs, skipped");
|
||||
listener.onSuccess();
|
||||
return;
|
||||
}
|
||||
@@ -418,25 +433,13 @@ public class PasspointManager {
|
||||
Log.d(TAG, "requestAnqpInfo end");
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO: doc
|
||||
*
|
||||
* @param c
|
||||
* @param requested
|
||||
* @param resolution
|
||||
* @param listener
|
||||
*/
|
||||
public void requestOsuIcons(Channel c, List<PasspointOsuProvider> requested,
|
||||
/** @hide */
|
||||
public void requestOsuIcons(Channel c, List<WifiPasspointOsuProvider> requested,
|
||||
int resolution, ActionListener listener) {
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO: doc
|
||||
*
|
||||
* @param requested
|
||||
* @return
|
||||
*/
|
||||
public List<PasspointPolicy> requestCredentialMatch(List<ScanResult> requested) {
|
||||
/** @hide */
|
||||
public List<WifiPasspointPolicy> requestCredentialMatch(List<ScanResult> requested) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -447,7 +450,7 @@ public class PasspointManager {
|
||||
*
|
||||
* @return The list of credentials
|
||||
*/
|
||||
public List<PasspointCredential> getSavedCredentials() {
|
||||
public List<WifiPasspointCredential> getSavedCredentials() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -457,32 +460,34 @@ public class PasspointManager {
|
||||
* @param cred The credential to be added
|
||||
* @return {@code true} if the operation succeeds, {@code false} otherwise
|
||||
*/
|
||||
public boolean addCredential(PasspointCredential cred) {
|
||||
public boolean addCredential(WifiPasspointCredential cred) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing Passpoint credential.
|
||||
* Update an existing Passpoint credential. Only system or the owner of this
|
||||
* credential has the permission to do this.
|
||||
*
|
||||
* @param cred The credential to be updated
|
||||
* @return {@code true} if the operation succeeds, {@code false} otherwise
|
||||
*/
|
||||
public boolean updateCredential(PasspointCredential cred) {
|
||||
public boolean updateCredential(WifiPasspointCredential cred) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove an existing Passpoint credential.
|
||||
* Remove an existing Passpoint credential. Only system or the owner of this
|
||||
* credential has the permission to do this.
|
||||
*
|
||||
* @param cred The credential to be removed
|
||||
* @return {@code true} if the operation succeeds, {@code false} otherwise
|
||||
*/
|
||||
public boolean removeCredential(PasspointCredential cred) {
|
||||
public boolean removeCredential(WifiPasspointCredential cred) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public void startOsu(Channel c, PasspointOsuProvider selected, OsuRemListener listener) {
|
||||
public void startOsu(Channel c, WifiPasspointOsuProvider selected, OsuRemListener listener) {
|
||||
|
||||
}
|
||||
|
||||
@@ -490,15 +495,12 @@ public class PasspointManager {
|
||||
public void startUserRemediation(Channel c, OsuRemListener listener) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Select and connect to a Passpoint network.
|
||||
*
|
||||
* @param selected Selected Passpoint network, see {@link PasspointPolicy}
|
||||
*/
|
||||
public void connect(PasspointPolicy selected) {
|
||||
/** @hide */
|
||||
public void connect(WifiPasspointPolicy selected) {
|
||||
}
|
||||
|
||||
private static void checkChannel(Channel c) {
|
||||
if (c == null) throw new IllegalArgumentException("Channel needs to be initialized");
|
||||
if (c == null)
|
||||
throw new IllegalArgumentException("Channel needs to be initialized");
|
||||
}
|
||||
}
|
||||
@@ -16,4 +16,4 @@
|
||||
|
||||
package android.net.wifi.passpoint;
|
||||
|
||||
parcelable PasspointInfo;
|
||||
parcelable WifiPasspointOsuProvider;
|
||||
@@ -19,18 +19,22 @@ package android.net.wifi.passpoint;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
/**
|
||||
* TODO: doc
|
||||
*/
|
||||
public class PasspointOsuProvider implements Parcelable {
|
||||
/** @hide */
|
||||
public class WifiPasspointOsuProvider implements Parcelable {
|
||||
|
||||
/** TODO: doc */
|
||||
/** TODO: doc
|
||||
* @hide
|
||||
*/
|
||||
public static final int OSU_METHOD_UNKNOWN = -1;
|
||||
|
||||
/** TODO: doc */
|
||||
/** TODO: doc
|
||||
* @hide
|
||||
*/
|
||||
public static final int OSU_METHOD_OMADM = 0;
|
||||
|
||||
/** TODO: doc */
|
||||
/** TODO: doc
|
||||
* @hide
|
||||
*/
|
||||
public static final int OSU_METHOD_SOAP = 1;
|
||||
|
||||
/** TODO: doc */
|
||||
@@ -39,10 +43,14 @@ public class PasspointOsuProvider implements Parcelable {
|
||||
/** TODO: doc */
|
||||
public String friendlyName;
|
||||
|
||||
/** TODO: doc */
|
||||
/** TODO: doc
|
||||
* @hide
|
||||
*/
|
||||
public String serverUri;
|
||||
|
||||
/** TODO: doc */
|
||||
/** TODO: doc
|
||||
* @hide
|
||||
*/
|
||||
public int osuMethod = OSU_METHOD_UNKNOWN;
|
||||
|
||||
/** TODO: doc */
|
||||
@@ -66,14 +74,13 @@ public class PasspointOsuProvider implements Parcelable {
|
||||
/** TODO: doc */
|
||||
public String osuService;
|
||||
|
||||
|
||||
/** default constructor @hide */
|
||||
public PasspointOsuProvider() {
|
||||
public WifiPasspointOsuProvider() {
|
||||
// TODO
|
||||
}
|
||||
|
||||
/** copy constructor @hide */
|
||||
public PasspointOsuProvider(PasspointOsuProvider source) {
|
||||
public WifiPasspointOsuProvider(WifiPasspointOsuProvider source) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
@@ -88,9 +95,9 @@ public class PasspointOsuProvider implements Parcelable {
|
||||
sb.append(" osuMethod: ").append(osuMethod);
|
||||
if (iconFileName != null) {
|
||||
sb.append(" icon: [").append(iconWidth).append("x")
|
||||
.append(iconHeight).append(" ")
|
||||
.append(iconType).append(" ")
|
||||
.append(iconFileName);
|
||||
.append(iconHeight).append(" ")
|
||||
.append(iconType).append(" ")
|
||||
.append(iconFileName);
|
||||
}
|
||||
if (osuNai != null)
|
||||
sb.append(" osuNai: ").append(osuNai);
|
||||
@@ -119,27 +126,27 @@ public class PasspointOsuProvider implements Parcelable {
|
||||
// TODO: icon image?
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator<PasspointOsuProvider> CREATOR =
|
||||
new Parcelable.Creator<PasspointOsuProvider>() {
|
||||
@Override
|
||||
public PasspointOsuProvider createFromParcel(Parcel in) {
|
||||
PasspointOsuProvider osu = new PasspointOsuProvider();
|
||||
osu.ssid = (String) in.readValue(String.class.getClassLoader());
|
||||
osu.friendlyName = (String) in.readValue(String.class.getClassLoader());
|
||||
osu.serverUri = (String) in.readValue(String.class.getClassLoader());
|
||||
osu.osuMethod = in.readInt();
|
||||
osu.iconWidth = in.readInt();
|
||||
osu.iconHeight = in.readInt();
|
||||
osu.iconType = (String) in.readValue(String.class.getClassLoader());
|
||||
osu.iconFileName = (String) in.readValue(String.class.getClassLoader());
|
||||
osu.osuNai = (String) in.readValue(String.class.getClassLoader());
|
||||
osu.osuService = (String) in.readValue(String.class.getClassLoader());
|
||||
return osu;
|
||||
}
|
||||
public static final Parcelable.Creator<WifiPasspointOsuProvider> CREATOR =
|
||||
new Parcelable.Creator<WifiPasspointOsuProvider>() {
|
||||
@Override
|
||||
public WifiPasspointOsuProvider createFromParcel(Parcel in) {
|
||||
WifiPasspointOsuProvider osu = new WifiPasspointOsuProvider();
|
||||
osu.ssid = (String) in.readValue(String.class.getClassLoader());
|
||||
osu.friendlyName = (String) in.readValue(String.class.getClassLoader());
|
||||
osu.serverUri = (String) in.readValue(String.class.getClassLoader());
|
||||
osu.osuMethod = in.readInt();
|
||||
osu.iconWidth = in.readInt();
|
||||
osu.iconHeight = in.readInt();
|
||||
osu.iconType = (String) in.readValue(String.class.getClassLoader());
|
||||
osu.iconFileName = (String) in.readValue(String.class.getClassLoader());
|
||||
osu.osuNai = (String) in.readValue(String.class.getClassLoader());
|
||||
osu.osuService = (String) in.readValue(String.class.getClassLoader());
|
||||
return osu;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PasspointOsuProvider[] newArray(int size) {
|
||||
return new PasspointOsuProvider[size];
|
||||
}
|
||||
};
|
||||
@Override
|
||||
public WifiPasspointOsuProvider[] newArray(int size) {
|
||||
return new WifiPasspointOsuProvider[size];
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -16,4 +16,4 @@
|
||||
|
||||
package android.net.wifi.passpoint;
|
||||
|
||||
parcelable WifiTree;
|
||||
parcelable WifiPasspointPolicy;
|
||||
226
wifi/java/android/net/wifi/passpoint/WifiPasspointPolicy.java
Normal file
226
wifi/java/android/net/wifi/passpoint/WifiPasspointPolicy.java
Normal file
@@ -0,0 +1,226 @@
|
||||
/*
|
||||
* Copyright (C) 2014 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.net.wifi.passpoint;
|
||||
|
||||
import android.os.Parcelable;
|
||||
import android.os.Parcel;
|
||||
import android.util.Log;
|
||||
|
||||
/** @hide */
|
||||
public class WifiPasspointPolicy implements Parcelable {
|
||||
|
||||
private final static String TAG = "PasspointPolicy";
|
||||
|
||||
/** @hide */
|
||||
public static final int HOME_SP = 0;
|
||||
|
||||
/** @hide */
|
||||
public static final int ROAMING_PARTNER = 1;
|
||||
|
||||
/** @hide */
|
||||
public static final int UNRESTRICTED = 2;
|
||||
|
||||
private String mName;
|
||||
private int mSubscriptionPriority;
|
||||
private int mRoamingPriority;
|
||||
private String mBssid;
|
||||
private String mSsid;
|
||||
private WifiPasspointCredential mCredential;
|
||||
private int mRestriction;// Permitted values are "HomeSP", "RoamingPartner", or "Unrestricted"
|
||||
private boolean mIsHomeSp;
|
||||
|
||||
/** @hide */
|
||||
public WifiPasspointPolicy(String name, int priority, String ssid,
|
||||
String bssid, WifiPasspointCredential pc,
|
||||
int restriction, boolean ishomesp) {
|
||||
mName = name;
|
||||
mSubscriptionPriority = priority;
|
||||
//PerProviderSubscription/<X+>/Policy/PreferredRoamingPartnerList/<X+>/Priority
|
||||
mRoamingPriority = 128; //default priority value of 128
|
||||
mSsid = ssid;
|
||||
mCredential = pc;
|
||||
mBssid = bssid;
|
||||
mRestriction = restriction;
|
||||
mIsHomeSp = ishomesp;
|
||||
}
|
||||
|
||||
public String getSsid() {
|
||||
return mSsid;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public void setBssid(String bssid) {
|
||||
mBssid = bssid;
|
||||
}
|
||||
|
||||
public String getBssid() {
|
||||
return mBssid;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public void setRestriction(int r) {
|
||||
mRestriction = r;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public int getRestriction() {
|
||||
return mRestriction;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public void setHomeSp(boolean b) {
|
||||
mIsHomeSp = b;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public boolean getHomeSp() {
|
||||
return mIsHomeSp;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public void setCredential(WifiPasspointCredential newCredential) {
|
||||
mCredential = newCredential;
|
||||
}
|
||||
|
||||
public WifiPasspointCredential getCredential() {
|
||||
// TODO: return a copy
|
||||
return mCredential;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public void setSubscriptionPriority(int priority) {
|
||||
mSubscriptionPriority = priority;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public void setRoamingPriority(int priority) {
|
||||
mRoamingPriority = priority;
|
||||
}
|
||||
|
||||
public int getSubscriptionPriority() {
|
||||
return mSubscriptionPriority;
|
||||
}
|
||||
|
||||
public int getRoamingPriority() {
|
||||
return mRoamingPriority;
|
||||
}
|
||||
|
||||
/** {@inheritDoc} @hide */
|
||||
public int compareTo(WifiPasspointPolicy another) {
|
||||
Log.d(TAG, "this:" + this);
|
||||
Log.d(TAG, "another:" + another);
|
||||
|
||||
if (another == null) {
|
||||
return -1;
|
||||
} else if (this.mIsHomeSp == true && another.getHomeSp() == false) {
|
||||
//home sp priority is higher then roaming
|
||||
Log.d(TAG, "compare HomeSP first, this is HomeSP, another isn't");
|
||||
return -1;
|
||||
} else if ((this.mIsHomeSp == true && another.getHomeSp() == true)) {
|
||||
Log.d(TAG, "both HomeSP");
|
||||
//if both home sp, compare subscription priority
|
||||
if (this.mSubscriptionPriority < another.getSubscriptionPriority()) {
|
||||
Log.d(TAG, "this priority is higher");
|
||||
return -1;
|
||||
} else if (this.mSubscriptionPriority == another.getSubscriptionPriority()) {
|
||||
Log.d(TAG, "both priorities equal");
|
||||
//if priority still the same, compare name(ssid)
|
||||
if (this.mName.compareTo(another.mName) != 0) {
|
||||
Log.d(TAG, "compare mName return:" + this.mName.compareTo(another.mName));
|
||||
return this.mName.compareTo(another.mName);
|
||||
}
|
||||
/**
|
||||
*if name still the same, compare credential
|
||||
*the device may has two more credentials(TLS,SIM..etc)
|
||||
*it can associate to one AP(same ssid). so we should compare by credential
|
||||
*/
|
||||
if (this.mCredential != null && another.mCredential != null) {
|
||||
if (this.mCredential.compareTo(another.mCredential) != 0) {
|
||||
Log.d(TAG,
|
||||
"compare mCredential return:" + this.mName.compareTo(another.mName));
|
||||
return this.mCredential.compareTo(another.mCredential);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
} else if ((this.mIsHomeSp == false && another.getHomeSp() == false)) {
|
||||
Log.d(TAG, "both RoamingSp");
|
||||
//if both roaming sp, compare roaming priority(preferredRoamingPartnerList/<X+>/priority)
|
||||
if (this.mRoamingPriority < another.getRoamingPriority()) {
|
||||
Log.d(TAG, "this priority is higher");
|
||||
return -1;
|
||||
} else if (this.mRoamingPriority == another.getRoamingPriority()) {//priority equals, compare name
|
||||
Log.d(TAG, "both priorities equal");
|
||||
//if priority still the same, compare name(ssid)
|
||||
if (this.mName.compareTo(another.mName) != 0) {
|
||||
Log.d(TAG, "compare mName return:" + this.mName.compareTo(another.mName));
|
||||
return this.mName.compareTo(another.mName);
|
||||
}
|
||||
//if name still the same, compare credential
|
||||
if (this.mCredential != null && another.mCredential != null) {
|
||||
if (this.mCredential.compareTo(another.mCredential) != 0) {
|
||||
Log.d(TAG,
|
||||
"compare mCredential return:"
|
||||
+ this.mCredential.compareTo(another.mCredential));
|
||||
return this.mCredential.compareTo(another.mCredential);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
Log.d(TAG, "both policies equal");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
/** @hide */
|
||||
public String toString() {
|
||||
return "PasspointPolicy: name=" + mName + " SubscriptionPriority=" + mSubscriptionPriority +
|
||||
" mRoamingPriority" + mRoamingPriority +
|
||||
" ssid=" + mSsid + " restriction=" + mRestriction +
|
||||
" ishomesp=" + mIsHomeSp + " Credential=" + mCredential;
|
||||
}
|
||||
|
||||
/** Implement the Parcelable interface {@hide} */
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** Implement the Parcelable interface {@hide} */
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
/** Implement the Parcelable interface {@hide} */
|
||||
public static final Creator<WifiPasspointPolicy> CREATOR =
|
||||
new Creator<WifiPasspointPolicy>() {
|
||||
@Override
|
||||
public WifiPasspointPolicy createFromParcel(Parcel in) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WifiPasspointPolicy[] newArray(int size) {
|
||||
return new WifiPasspointPolicy[size];
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2014 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.net.wifi.passpoint;
|
||||
|
||||
import android.os.Parcelable;
|
||||
import android.os.Parcel;
|
||||
|
||||
/** @hide */
|
||||
public class WifiTree implements Parcelable {
|
||||
|
||||
/** Implement the Parcelable interface {@hide} */
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** Implement the Parcelable interface {@hide} */
|
||||
@Override
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
/** Implement the Parcelable interface {@hide} */
|
||||
public static final Parcelable.Creator<WifiTree> CREATOR =
|
||||
new Parcelable.Creator<WifiTree>() {
|
||||
@Override
|
||||
public WifiTree createFromParcel(Parcel in) {
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WifiTree[] newArray(int size) {
|
||||
return new WifiTree[size];
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user