[Passpoint] Unhide HomeSP APIs used for matching

Unhide HomeSP APIs used for profile matching:
setOtherHomePartners
getOtherHomePartners
setMatchAnyOis
getMatchAnyOis
setMatchAllOis
getMatchAllOis

This will allow apps to program these values and take advantage
of the new matching logic implemented in the framework.

Bug: 168652313
Test: atest HomeSpTest
Change-Id: Ibba74d21526125f4be5d541656f8ed2a580cdad7
This commit is contained in:
Hai Shalom
2020-09-15 15:32:11 -07:00
parent a28729b629
commit 15532c07b4
3 changed files with 57 additions and 14 deletions

View File

@@ -32002,9 +32002,15 @@ package android.net.wifi.hotspot2.pps {
method public int describeContents();
method public String getFqdn();
method public String getFriendlyName();
method @Nullable public long[] getMatchAllOis();
method @Nullable public long[] getMatchAnyOis();
method @Nullable public String[] getOtherHomePartners();
method public long[] getRoamingConsortiumOis();
method public void setFqdn(String);
method public void setFriendlyName(String);
method public void setMatchAllOis(@Nullable long[]);
method public void setMatchAnyOis(@Nullable long[]);
method public void setOtherHomePartners(@Nullable String[]);
method public void setRoamingConsortiumOis(long[]);
method public void writeToParcel(android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.pps.HomeSp> CREATOR;

View File

@@ -798,9 +798,15 @@ package android.net.wifi.hotspot2.pps {
method public int describeContents();
method public String getFqdn();
method public String getFriendlyName();
method @Nullable public long[] getMatchAllOis();
method @Nullable public long[] getMatchAnyOis();
method @Nullable public String[] getOtherHomePartners();
method public long[] getRoamingConsortiumOis();
method public void setFqdn(String);
method public void setFriendlyName(String);
method public void setMatchAllOis(@Nullable long[]);
method public void setMatchAnyOis(@Nullable long[]);
method public void setOtherHomePartners(@Nullable String[]);
method public void setRoamingConsortiumOis(long[]);
method public void writeToParcel(android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.pps.HomeSp> CREATOR;

View File

@@ -16,6 +16,7 @@
package android.net.wifi.hotspot2.pps;
import android.annotation.Nullable;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
@@ -139,16 +140,26 @@ public final class HomeSp implements Parcelable {
* (MO) tree for more detail.
*/
private long[] mMatchAllOis = null;
/**
* @hide
* Set a list of HomeOIs such that all OIs in the list must match an OI in the Roaming
* Consortium advertised by a hotspot operator. The list set by this API will have precedence
* over {@link #setMatchAnyOis(long[])}, meaning the list set in {@link #setMatchAnyOis(long[])}
* will only be used for matching if the list set by this API is null or empty.
*
* @param matchAllOis An array of longs containing the HomeOIs
*/
public void setMatchAllOis(long[] matchAllOis) {
public void setMatchAllOis(@Nullable long[] matchAllOis) {
mMatchAllOis = matchAllOis;
}
/**
* @hide
* Get the list of HomeOIs such that all OIs in the list must match an OI in the Roaming
* Consortium advertised by a hotspot operator.
*
* @return An array of longs containing the HomeOIs
*/
public long[] getMatchAllOis() {
public @Nullable long[] getMatchAllOis() {
return mMatchAllOis;
}
@@ -159,23 +170,34 @@ public final class HomeSp implements Parcelable {
* of that Hotspot provider (e.g. successful authentication with such Hotspot
* is possible).
*
* {@link #mMatchAllOIs} will have precedence over this one, meaning this list will
* only be used for matching if {@link #mMatchAllOIs} is null or empty.
* The list set by {@link #setMatchAllOis(long[])} will have precedence over this one, meaning
* this list will only be used for matching if the list set by {@link #setMatchAllOis(long[])}
* is null or empty.
*
* Refer to HomeSP/HomeOIList subtree in PerProviderSubscription (PPS) Management Object
* (MO) tree for more detail.
*/
private long[] mMatchAnyOis = null;
/**
* @hide
* Set a list of HomeOIs such that any OI in the list matches an OI in the Roaming Consortium
* advertised by a hotspot operator. The list set by {@link #setMatchAllOis(long[])}
* will have precedence over this API, meaning this list will only be used for matching if the
* list set by {@link #setMatchAllOis(long[])} is null or empty.
*
* @param matchAnyOis An array of longs containing the HomeOIs
*/
public void setMatchAnyOis(long[] matchAnyOis) {
public void setMatchAnyOis(@Nullable long[] matchAnyOis) {
mMatchAnyOis = matchAnyOis;
}
/**
* @hide
* Get a list of HomeOIs such that any OI in the list matches an OI in the Roaming Consortium
* advertised by a hotspot operator.
*
* @return An array of longs containing the HomeOIs
*/
public long[] getMatchAnyOis() {
public @Nullable long[] getMatchAnyOis() {
return mMatchAnyOis;
}
@@ -186,16 +208,25 @@ public final class HomeSp implements Parcelable {
* operator merges between the providers.
*/
private String[] mOtherHomePartners = null;
/**
* @hide
* Set the list of FQDN (Fully Qualified Domain Name) of other Home partner providers.
*
* @param otherHomePartners Array of Strings containing the FQDNs of other Home partner
* providers
*/
public void setOtherHomePartners(String[] otherHomePartners) {
public void setOtherHomePartners(@Nullable String[] otherHomePartners) {
mOtherHomePartners = otherHomePartners;
}
/**
* @hide
* Get the list of FQDN (Fully Qualified Domain Name) of other Home partner providers set in
* the profile.
*
* @return Array of Strings containing the FQDNs of other Home partner providers set in the
* profile
*/
public String[] getOtherHomePartners() {
public @Nullable String[] getOtherHomePartners() {
return mOtherHomePartners;
}