Merge "wifi: hotspot2: add Passpoint APIs to WifiManager"
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
package android.net.wifi;
|
package android.net.wifi;
|
||||||
|
|
||||||
|
import android.net.wifi.hotspot2.PasspointConfiguration;
|
||||||
import android.net.wifi.WifiConfiguration;
|
import android.net.wifi.WifiConfiguration;
|
||||||
import android.net.wifi.WifiInfo;
|
import android.net.wifi.WifiInfo;
|
||||||
import android.net.wifi.ScanSettings;
|
import android.net.wifi.ScanSettings;
|
||||||
@@ -63,6 +64,12 @@ interface IWifiManager
|
|||||||
int modifyPasspointManagementObject(String fqdn,
|
int modifyPasspointManagementObject(String fqdn,
|
||||||
in List<PasspointManagementObjectDefinition> mos);
|
in List<PasspointManagementObjectDefinition> mos);
|
||||||
|
|
||||||
|
boolean addPasspointConfiguration(in PasspointConfiguration config);
|
||||||
|
|
||||||
|
boolean removePasspointConfiguration(in String fqdn);
|
||||||
|
|
||||||
|
List<PasspointConfiguration> getPasspointConfigurations();
|
||||||
|
|
||||||
void queryPasspointIcon(long bssid, String fileName);
|
void queryPasspointIcon(long bssid, String fileName);
|
||||||
|
|
||||||
int matchProviderWithCurrentNetwork(String fqdn);
|
int matchProviderWithCurrentNetwork(String fqdn);
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import android.net.DhcpInfo;
|
|||||||
import android.net.Network;
|
import android.net.Network;
|
||||||
import android.net.NetworkCapabilities;
|
import android.net.NetworkCapabilities;
|
||||||
import android.net.NetworkRequest;
|
import android.net.NetworkRequest;
|
||||||
|
import android.net.wifi.hotspot2.PasspointConfiguration;
|
||||||
import android.os.Binder;
|
import android.os.Binder;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
@@ -845,6 +846,56 @@ public class WifiManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a Passpoint configuration. The configuration provides a credential
|
||||||
|
* for connecting to Passpoint networks that are operated by the Passpoint
|
||||||
|
* service provider specified in the configuration.
|
||||||
|
*
|
||||||
|
* Each configuration is uniquely identified by its FQDN (Fully Qualified Domain
|
||||||
|
* Name). In the case when there is an existing configuration with the same base
|
||||||
|
* domain, the new configuration will replace the existing configuration.
|
||||||
|
*
|
||||||
|
* @param config The Passpoint configuration to be added
|
||||||
|
* @return true on success or false on failure
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public boolean addPasspointConfiguration(PasspointConfiguration config) {
|
||||||
|
try {
|
||||||
|
return mService.addPasspointConfiguration(config);
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
throw e.rethrowFromSystemServer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove a Passpoint configuration identified by its FQDN (Fully Qualified Domain Name).
|
||||||
|
*
|
||||||
|
* @param fqdn The FQDN of the passpoint configuration to be removed
|
||||||
|
* @return true on success or false on failure
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public boolean removePasspointConfiguration(String fqdn) {
|
||||||
|
try {
|
||||||
|
return mService.removePasspointConfiguration(fqdn);
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
throw e.rethrowFromSystemServer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the list of installed Passpoint configurations.
|
||||||
|
*
|
||||||
|
* @return A list of PasspointConfiguration or null
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public List<PasspointConfiguration> getPasspointConfigurations() {
|
||||||
|
try {
|
||||||
|
return mService.getPasspointConfigurations();
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
throw e.rethrowFromSystemServer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Query for a Hotspot 2.0 release 2 OSU icon
|
* Query for a Hotspot 2.0 release 2 OSU icon
|
||||||
* @param bssid The BSSID of the AP
|
* @param bssid The BSSID of the AP
|
||||||
|
|||||||
Reference in New Issue
Block a user