Loading wifi/java/android/net/wifi/hotspot2/ConfigParser.java +6 −7 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ package android.net.wifi.hotspot2; import android.net.wifi.hotspot2.omadm.PPSMOParser; import android.net.wifi.hotspot2.omadm.PpsMoParser; import android.text.TextUtils; import android.util.Base64; import android.util.Log; Loading Loading @@ -44,8 +44,8 @@ import java.util.Map; * * @hide */ public final class ConfigBuilder { private static final String TAG = "ConfigBuilder"; public final class ConfigParser { private static final String TAG = "ConfigParser"; // Header names. private static final String CONTENT_TYPE = "Content-Type"; Loading Loading @@ -101,7 +101,6 @@ public final class ConfigBuilder { public String encodingType = null; } /** * Parse the Hotspot 2.0 Release 1 configuration data into a {@link PasspointConfiguration} * object. The configuration data is a base64 encoded MIME multipart data. Below is Loading Loading @@ -133,7 +132,7 @@ public final class ConfigBuilder { * certificate chain (optional). * @return {@link PasspointConfiguration} */ public static PasspointConfiguration buildPasspointConfig(String mimeType, byte[] data) { public static PasspointConfiguration parsePasspointConfig(String mimeType, byte[] data) { // Verify MIME type. if (!TextUtils.equals(mimeType, TYPE_WIFI_CONFIG)) { Log.e(TAG, "Unexpected MIME type: " + mimeType); Loading Loading @@ -169,7 +168,7 @@ public final class ConfigBuilder { throw new IOException("Missing Passpoint Profile"); } PasspointConfiguration config = PPSMOParser.parseMOText(new String(profileData)); PasspointConfiguration config = PpsMoParser.parseMoText(new String(profileData)); if (config == null) { throw new IOException("Failed to parse Passpoint profile"); } Loading wifi/java/android/net/wifi/hotspot2/PasspointConfiguration.java +6 −6 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ package android.net.wifi.hotspot2; import android.net.wifi.hotspot2.pps.Credential; import android.net.wifi.hotspot2.pps.HomeSP; import android.net.wifi.hotspot2.pps.HomeSp; import android.net.wifi.hotspot2.pps.Policy; import android.net.wifi.hotspot2.pps.UpdateParameter; import android.os.Parcelable; Loading Loading @@ -60,11 +60,11 @@ public final class PasspointConfiguration implements Parcelable { private static final int NULL_VALUE = -1; /** * Configurations under HomeSP subtree. * Configurations under HomeSp subtree. */ private HomeSP mHomeSp = null; public void setHomeSp(HomeSP homeSp) { mHomeSp = homeSp; } public HomeSP getHomeSp() { return mHomeSp; } private HomeSp mHomeSp = null; public void setHomeSp(HomeSp homeSp) { mHomeSp = homeSp; } public HomeSp getHomeSp() { return mHomeSp; } /** * Configurations under Credential subtree. Loading Loading @@ -248,7 +248,7 @@ public final class PasspointConfiguration implements Parcelable { } if (source.mHomeSp != null) { mHomeSp = new HomeSP(source.mHomeSp); mHomeSp = new HomeSp(source.mHomeSp); } if (source.mCredential != null) { mCredential = new Credential(source.mCredential); Loading wifi/java/android/net/wifi/hotspot2/omadm/PpsMoParser.java +10 −10 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ package android.net.wifi.hotspot2.omadm; import android.net.wifi.hotspot2.PasspointConfiguration; import android.net.wifi.hotspot2.pps.Credential; import android.net.wifi.hotspot2.pps.HomeSP; import android.net.wifi.hotspot2.pps.HomeSp; import android.net.wifi.hotspot2.pps.Policy; import android.net.wifi.hotspot2.pps.UpdateParameter; import android.text.TextUtils; Loading Loading @@ -112,8 +112,8 @@ import org.xml.sax.SAXException; * * @hide */ public final class PPSMOParser { private static final String TAG = "PPSMOParser"; public final class PpsMoParser { private static final String TAG = "PpsMoParser"; /** * XML tags expected in the PPS MO (PerProviderSubscription Management Object) XML tree. Loading Loading @@ -332,7 +332,7 @@ public final class PPSMOParser { * @param xmlString XML string representation of a PPS MO tree * @return {@link PasspointConfiguration} or null */ public static PasspointConfiguration parseMOText(String xmlString) { public static PasspointConfiguration parseMoText(String xmlString) { // Convert the XML string to a XML tree. XMLParser xmlParser = new XMLParser(); XMLNode root = null; Loading Loading @@ -640,12 +640,12 @@ public final class PPSMOParser { * @return HomeSP * @throws ParsingException */ private static HomeSP parseHomeSP(PPSNode node) throws ParsingException { private static HomeSp parseHomeSP(PPSNode node) throws ParsingException { if (node.isLeaf()) { throw new ParsingException("Leaf node not expected for HomeSP"); } HomeSP homeSp = new HomeSP(); HomeSp homeSp = new HomeSp(); for (PPSNode child : node.getChildren()) { switch (child.getName()) { case NODE_FQDN: Loading @@ -655,7 +655,7 @@ public final class PPSMOParser { homeSp.setFriendlyName(getPpsNodeValue(child)); break; case NODE_ROAMING_CONSORTIUM_OI: homeSp.setRoamingConsortiumOIs( homeSp.setRoamingConsortiumOis( parseRoamingConsortiumOI(getPpsNodeValue(child))); break; case NODE_ICON_URL: Loading @@ -666,8 +666,8 @@ public final class PPSMOParser { break; case NODE_HOME_OI_LIST: Pair<List<Long>, List<Long>> homeOIs = parseHomeOIList(child); homeSp.setMatchAllOIs(convertFromLongList(homeOIs.first)); homeSp.setMatchAnyOIs(convertFromLongList(homeOIs.second)); homeSp.setMatchAllOis(convertFromLongList(homeOIs.first)); homeSp.setMatchAnyOis(convertFromLongList(homeOIs.second)); break; case NODE_OTHER_HOME_PARTNERS: homeSp.setOtherHomePartners(parseOtherHomePartners(child)); Loading Loading @@ -909,7 +909,7 @@ public final class PPSMOParser { credential.setRealm(getPpsNodeValue(child)); break; case NODE_CHECK_AAA_SERVER_CERT_STATUS: credential.setCheckAAAServerCertStatus( credential.setCheckAaaServerCertStatus( Boolean.parseBoolean(getPpsNodeValue(child))); break; case NODE_SIM: Loading wifi/java/android/net/wifi/hotspot2/pps/Credential.java +10 −10 Original line number Diff line number Diff line Loading @@ -98,12 +98,12 @@ public final class Credential implements Parcelable { * and Accounting) server's certificate during EAP (Extensible Authentication * Protocol) authentication. */ private boolean mCheckAAAServerCertStatus = false; public void setCheckAAAServerCertStatus(boolean checkAAAServerCertStatus) { mCheckAAAServerCertStatus = checkAAAServerCertStatus; private boolean mCheckAaaServerCertStatus = false; public void setCheckAaaServerCertStatus(boolean checkAaaServerCertStatus) { mCheckAaaServerCertStatus = checkAaaServerCertStatus; } public boolean getCheckAAAServerStatus() { return mCheckAAAServerCertStatus; public boolean getCheckAaaServerStatus() { return mCheckAaaServerCertStatus; } /** Loading Loading @@ -685,7 +685,7 @@ public final class Credential implements Parcelable { mCreationTimeInMs = source.mCreationTimeInMs; mExpirationTimeInMs = source.mExpirationTimeInMs; mRealm = source.mRealm; mCheckAAAServerCertStatus = source.mCheckAAAServerCertStatus; mCheckAaaServerCertStatus = source.mCheckAaaServerCertStatus; if (source.mUserCredential != null) { mUserCredential = new UserCredential(source.mUserCredential); } Loading Loading @@ -714,7 +714,7 @@ public final class Credential implements Parcelable { dest.writeLong(mCreationTimeInMs); dest.writeLong(mExpirationTimeInMs); dest.writeString(mRealm); dest.writeInt(mCheckAAAServerCertStatus ? 1 : 0); dest.writeInt(mCheckAaaServerCertStatus ? 1 : 0); dest.writeParcelable(mUserCredential, flags); dest.writeParcelable(mCertCredential, flags); dest.writeParcelable(mSimCredential, flags); Loading @@ -736,7 +736,7 @@ public final class Credential implements Parcelable { return TextUtils.equals(mRealm, that.mRealm) && mCreationTimeInMs == that.mCreationTimeInMs && mExpirationTimeInMs == that.mExpirationTimeInMs && mCheckAAAServerCertStatus == that.mCheckAAAServerCertStatus && mCheckAaaServerCertStatus == that.mCheckAaaServerCertStatus && (mUserCredential == null ? that.mUserCredential == null : mUserCredential.equals(that.mUserCredential)) && (mCertCredential == null ? that.mCertCredential == null Loading @@ -751,7 +751,7 @@ public final class Credential implements Parcelable { @Override public int hashCode() { return Objects.hash(mRealm, mCreationTimeInMs, mExpirationTimeInMs, mCheckAAAServerCertStatus, mUserCredential, mCertCredential, mSimCredential, mCheckAaaServerCertStatus, mUserCredential, mCertCredential, mSimCredential, mCaCertificate, mClientCertificateChain, mClientPrivateKey); } Loading Loading @@ -800,7 +800,7 @@ public final class Credential implements Parcelable { credential.setCreationTimeInMs(in.readLong()); credential.setExpirationTimeInMs(in.readLong()); credential.setRealm(in.readString()); credential.setCheckAAAServerCertStatus(in.readInt() != 0); credential.setCheckAaaServerCertStatus(in.readInt() != 0); credential.setUserCredential(in.readParcelable(null)); credential.setCertCredential(in.readParcelable(null)); credential.setSimCredential(in.readParcelable(null)); Loading wifi/java/android/net/wifi/hotspot2/pps/HomeSp.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -16,4 +16,4 @@ package android.net.wifi.hotspot2.pps; parcelable HomeSP; parcelable HomeSp; Loading
wifi/java/android/net/wifi/hotspot2/ConfigParser.java +6 −7 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ package android.net.wifi.hotspot2; import android.net.wifi.hotspot2.omadm.PPSMOParser; import android.net.wifi.hotspot2.omadm.PpsMoParser; import android.text.TextUtils; import android.util.Base64; import android.util.Log; Loading Loading @@ -44,8 +44,8 @@ import java.util.Map; * * @hide */ public final class ConfigBuilder { private static final String TAG = "ConfigBuilder"; public final class ConfigParser { private static final String TAG = "ConfigParser"; // Header names. private static final String CONTENT_TYPE = "Content-Type"; Loading Loading @@ -101,7 +101,6 @@ public final class ConfigBuilder { public String encodingType = null; } /** * Parse the Hotspot 2.0 Release 1 configuration data into a {@link PasspointConfiguration} * object. The configuration data is a base64 encoded MIME multipart data. Below is Loading Loading @@ -133,7 +132,7 @@ public final class ConfigBuilder { * certificate chain (optional). * @return {@link PasspointConfiguration} */ public static PasspointConfiguration buildPasspointConfig(String mimeType, byte[] data) { public static PasspointConfiguration parsePasspointConfig(String mimeType, byte[] data) { // Verify MIME type. if (!TextUtils.equals(mimeType, TYPE_WIFI_CONFIG)) { Log.e(TAG, "Unexpected MIME type: " + mimeType); Loading Loading @@ -169,7 +168,7 @@ public final class ConfigBuilder { throw new IOException("Missing Passpoint Profile"); } PasspointConfiguration config = PPSMOParser.parseMOText(new String(profileData)); PasspointConfiguration config = PpsMoParser.parseMoText(new String(profileData)); if (config == null) { throw new IOException("Failed to parse Passpoint profile"); } Loading
wifi/java/android/net/wifi/hotspot2/PasspointConfiguration.java +6 −6 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ package android.net.wifi.hotspot2; import android.net.wifi.hotspot2.pps.Credential; import android.net.wifi.hotspot2.pps.HomeSP; import android.net.wifi.hotspot2.pps.HomeSp; import android.net.wifi.hotspot2.pps.Policy; import android.net.wifi.hotspot2.pps.UpdateParameter; import android.os.Parcelable; Loading Loading @@ -60,11 +60,11 @@ public final class PasspointConfiguration implements Parcelable { private static final int NULL_VALUE = -1; /** * Configurations under HomeSP subtree. * Configurations under HomeSp subtree. */ private HomeSP mHomeSp = null; public void setHomeSp(HomeSP homeSp) { mHomeSp = homeSp; } public HomeSP getHomeSp() { return mHomeSp; } private HomeSp mHomeSp = null; public void setHomeSp(HomeSp homeSp) { mHomeSp = homeSp; } public HomeSp getHomeSp() { return mHomeSp; } /** * Configurations under Credential subtree. Loading Loading @@ -248,7 +248,7 @@ public final class PasspointConfiguration implements Parcelable { } if (source.mHomeSp != null) { mHomeSp = new HomeSP(source.mHomeSp); mHomeSp = new HomeSp(source.mHomeSp); } if (source.mCredential != null) { mCredential = new Credential(source.mCredential); Loading
wifi/java/android/net/wifi/hotspot2/omadm/PpsMoParser.java +10 −10 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ package android.net.wifi.hotspot2.omadm; import android.net.wifi.hotspot2.PasspointConfiguration; import android.net.wifi.hotspot2.pps.Credential; import android.net.wifi.hotspot2.pps.HomeSP; import android.net.wifi.hotspot2.pps.HomeSp; import android.net.wifi.hotspot2.pps.Policy; import android.net.wifi.hotspot2.pps.UpdateParameter; import android.text.TextUtils; Loading Loading @@ -112,8 +112,8 @@ import org.xml.sax.SAXException; * * @hide */ public final class PPSMOParser { private static final String TAG = "PPSMOParser"; public final class PpsMoParser { private static final String TAG = "PpsMoParser"; /** * XML tags expected in the PPS MO (PerProviderSubscription Management Object) XML tree. Loading Loading @@ -332,7 +332,7 @@ public final class PPSMOParser { * @param xmlString XML string representation of a PPS MO tree * @return {@link PasspointConfiguration} or null */ public static PasspointConfiguration parseMOText(String xmlString) { public static PasspointConfiguration parseMoText(String xmlString) { // Convert the XML string to a XML tree. XMLParser xmlParser = new XMLParser(); XMLNode root = null; Loading Loading @@ -640,12 +640,12 @@ public final class PPSMOParser { * @return HomeSP * @throws ParsingException */ private static HomeSP parseHomeSP(PPSNode node) throws ParsingException { private static HomeSp parseHomeSP(PPSNode node) throws ParsingException { if (node.isLeaf()) { throw new ParsingException("Leaf node not expected for HomeSP"); } HomeSP homeSp = new HomeSP(); HomeSp homeSp = new HomeSp(); for (PPSNode child : node.getChildren()) { switch (child.getName()) { case NODE_FQDN: Loading @@ -655,7 +655,7 @@ public final class PPSMOParser { homeSp.setFriendlyName(getPpsNodeValue(child)); break; case NODE_ROAMING_CONSORTIUM_OI: homeSp.setRoamingConsortiumOIs( homeSp.setRoamingConsortiumOis( parseRoamingConsortiumOI(getPpsNodeValue(child))); break; case NODE_ICON_URL: Loading @@ -666,8 +666,8 @@ public final class PPSMOParser { break; case NODE_HOME_OI_LIST: Pair<List<Long>, List<Long>> homeOIs = parseHomeOIList(child); homeSp.setMatchAllOIs(convertFromLongList(homeOIs.first)); homeSp.setMatchAnyOIs(convertFromLongList(homeOIs.second)); homeSp.setMatchAllOis(convertFromLongList(homeOIs.first)); homeSp.setMatchAnyOis(convertFromLongList(homeOIs.second)); break; case NODE_OTHER_HOME_PARTNERS: homeSp.setOtherHomePartners(parseOtherHomePartners(child)); Loading Loading @@ -909,7 +909,7 @@ public final class PPSMOParser { credential.setRealm(getPpsNodeValue(child)); break; case NODE_CHECK_AAA_SERVER_CERT_STATUS: credential.setCheckAAAServerCertStatus( credential.setCheckAaaServerCertStatus( Boolean.parseBoolean(getPpsNodeValue(child))); break; case NODE_SIM: Loading
wifi/java/android/net/wifi/hotspot2/pps/Credential.java +10 −10 Original line number Diff line number Diff line Loading @@ -98,12 +98,12 @@ public final class Credential implements Parcelable { * and Accounting) server's certificate during EAP (Extensible Authentication * Protocol) authentication. */ private boolean mCheckAAAServerCertStatus = false; public void setCheckAAAServerCertStatus(boolean checkAAAServerCertStatus) { mCheckAAAServerCertStatus = checkAAAServerCertStatus; private boolean mCheckAaaServerCertStatus = false; public void setCheckAaaServerCertStatus(boolean checkAaaServerCertStatus) { mCheckAaaServerCertStatus = checkAaaServerCertStatus; } public boolean getCheckAAAServerStatus() { return mCheckAAAServerCertStatus; public boolean getCheckAaaServerStatus() { return mCheckAaaServerCertStatus; } /** Loading Loading @@ -685,7 +685,7 @@ public final class Credential implements Parcelable { mCreationTimeInMs = source.mCreationTimeInMs; mExpirationTimeInMs = source.mExpirationTimeInMs; mRealm = source.mRealm; mCheckAAAServerCertStatus = source.mCheckAAAServerCertStatus; mCheckAaaServerCertStatus = source.mCheckAaaServerCertStatus; if (source.mUserCredential != null) { mUserCredential = new UserCredential(source.mUserCredential); } Loading Loading @@ -714,7 +714,7 @@ public final class Credential implements Parcelable { dest.writeLong(mCreationTimeInMs); dest.writeLong(mExpirationTimeInMs); dest.writeString(mRealm); dest.writeInt(mCheckAAAServerCertStatus ? 1 : 0); dest.writeInt(mCheckAaaServerCertStatus ? 1 : 0); dest.writeParcelable(mUserCredential, flags); dest.writeParcelable(mCertCredential, flags); dest.writeParcelable(mSimCredential, flags); Loading @@ -736,7 +736,7 @@ public final class Credential implements Parcelable { return TextUtils.equals(mRealm, that.mRealm) && mCreationTimeInMs == that.mCreationTimeInMs && mExpirationTimeInMs == that.mExpirationTimeInMs && mCheckAAAServerCertStatus == that.mCheckAAAServerCertStatus && mCheckAaaServerCertStatus == that.mCheckAaaServerCertStatus && (mUserCredential == null ? that.mUserCredential == null : mUserCredential.equals(that.mUserCredential)) && (mCertCredential == null ? that.mCertCredential == null Loading @@ -751,7 +751,7 @@ public final class Credential implements Parcelable { @Override public int hashCode() { return Objects.hash(mRealm, mCreationTimeInMs, mExpirationTimeInMs, mCheckAAAServerCertStatus, mUserCredential, mCertCredential, mSimCredential, mCheckAaaServerCertStatus, mUserCredential, mCertCredential, mSimCredential, mCaCertificate, mClientCertificateChain, mClientPrivateKey); } Loading Loading @@ -800,7 +800,7 @@ public final class Credential implements Parcelable { credential.setCreationTimeInMs(in.readLong()); credential.setExpirationTimeInMs(in.readLong()); credential.setRealm(in.readString()); credential.setCheckAAAServerCertStatus(in.readInt() != 0); credential.setCheckAaaServerCertStatus(in.readInt() != 0); credential.setUserCredential(in.readParcelable(null)); credential.setCertCredential(in.readParcelable(null)); credential.setSimCredential(in.readParcelable(null)); Loading
wifi/java/android/net/wifi/hotspot2/pps/HomeSp.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -16,4 +16,4 @@ package android.net.wifi.hotspot2.pps; parcelable HomeSP; parcelable HomeSp;