OSDN Git Service

wifi: hotspot2: Passpoint configuration APIs update
authorPeter Qiu <zqiu@google.com>
Thu, 15 Dec 2016 23:38:56 +0000 (15:38 -0800)
committerPeter Qiu <zqiu@google.com>
Fri, 6 Jan 2017 22:06:52 +0000 (14:06 -0800)
- renamed addPasspointConfiguration to addOrUpdatePasspointConfiguration
  to match the implementation of the API
- updated getPasspointConfigurations to return an empty list instead of
  a null when no configuration is installled

Bug: 33587910
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: Id40185edb08910c01454c44b77957e2d5c0df722

wifi/java/android/net/wifi/IWifiManager.aidl
wifi/java/android/net/wifi/WifiManager.java

index 9e897bf..18c1245 100644 (file)
@@ -59,7 +59,7 @@ interface IWifiManager
 
     int addOrUpdateNetwork(in WifiConfiguration config);
 
-    boolean addPasspointConfiguration(in PasspointConfiguration config);
+    boolean addOrUpdatePasspointConfiguration(in PasspointConfiguration config);
 
     boolean removePasspointConfiguration(in String fqdn);
 
index 674c161..618a719 100644 (file)
@@ -842,31 +842,31 @@ public class WifiManager {
     }
 
     /**
-     * Add a Passpoint configuration.  The configuration provides a credential
+     * Add or update 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.
+     * Name).  In the case when there is an existing configuration with the same
+     * FQDN, the new configuration will replace the existing configuration.
      *
      * @param config The Passpoint configuration to be added
-     * @return true on success or false on failure
+     * @return true on success
      * @hide
      */
-    public boolean addPasspointConfiguration(PasspointConfiguration config) {
+    public boolean addOrUpdatePasspointConfiguration(PasspointConfiguration config) {
         try {
-            return mService.addPasspointConfiguration(config);
+            return mService.addOrUpdatePasspointConfiguration(config);
         } catch (RemoteException e) {
             throw e.rethrowFromSystemServer();
         }
     }
 
     /**
-     * Remove a Passpoint configuration identified by its FQDN (Fully Qualified Domain Name).
+     * Remove the 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
+     * @return true on success
      * @hide
      */
     public boolean removePasspointConfiguration(String fqdn) {
@@ -880,7 +880,9 @@ public class WifiManager {
     /**
      * Return the list of installed Passpoint configurations.
      *
-     * @return A list of PasspointConfiguration or null
+     * An empty list will be returned when no configurations are installed.
+     *
+     * @return A list of {@link PasspointConfiguration}
      * @hide
      */
     public List<PasspointConfiguration> getPasspointConfigurations() {