summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
authorVinit Deshpande <vinitd@google.com>2014-08-10 22:00:30 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-08-09 00:40:15 +0000
commit88992bc90c874eb0eb159b3ea37659a8b83bbee0 (patch)
tree36e6f1ce8e13a79dc46841a3e1bcde00d4d3e6c6 /wifi
parent0b798b97dc24d9909ab1fd6e360e4be950976263 (diff)
parent894651bab56bfcfa2ecb35dfac262f2590ff483d (diff)
downloadframeworks_base-88992bc90c874eb0eb159b3ea37659a8b83bbee0.zip
frameworks_base-88992bc90c874eb0eb159b3ea37659a8b83bbee0.tar.gz
frameworks_base-88992bc90c874eb0eb159b3ea37659a8b83bbee0.tar.bz2
Merge "Unhide WifiPasspointManager for ANQP APIs - DO NOT MERGE" into lmp-dev
Diffstat (limited to 'wifi')
-rw-r--r--wifi/java/android/net/wifi/ScanResult.java1
-rw-r--r--wifi/java/android/net/wifi/passpoint/WifiPasspointInfo.java1
-rw-r--r--wifi/java/android/net/wifi/passpoint/WifiPasspointManager.java149
3 files changed, 1 insertions, 150 deletions
diff --git a/wifi/java/android/net/wifi/ScanResult.java b/wifi/java/android/net/wifi/ScanResult.java
index f0a7f38..a561dc2 100644
--- a/wifi/java/android/net/wifi/ScanResult.java
+++ b/wifi/java/android/net/wifi/ScanResult.java
@@ -141,7 +141,6 @@ public class ScanResult implements Parcelable {
/**
* Passpoint ANQP information. This is not fetched automatically.
* Use {@link WifiPasspointManager#requestAnqpInfo} to request ANQP info.
- * {@hide}
*/
public WifiPasspointInfo passpoint;
diff --git a/wifi/java/android/net/wifi/passpoint/WifiPasspointInfo.java b/wifi/java/android/net/wifi/passpoint/WifiPasspointInfo.java
index 33db3f5..32cf773 100644
--- a/wifi/java/android/net/wifi/passpoint/WifiPasspointInfo.java
+++ b/wifi/java/android/net/wifi/passpoint/WifiPasspointInfo.java
@@ -22,7 +22,6 @@ import android.os.Parcelable;
import java.util.ArrayList;
import java.util.List;
-/** @hide */
public class WifiPasspointInfo implements Parcelable {
/** TODO doc */
diff --git a/wifi/java/android/net/wifi/passpoint/WifiPasspointManager.java b/wifi/java/android/net/wifi/passpoint/WifiPasspointManager.java
index b9b17eb..b2b5310 100644
--- a/wifi/java/android/net/wifi/passpoint/WifiPasspointManager.java
+++ b/wifi/java/android/net/wifi/passpoint/WifiPasspointManager.java
@@ -37,7 +37,6 @@ import java.util.List;
/**
* Provides APIs for managing Wifi Passpoint credentials.
- * @hide
*/
public class WifiPasspointManager {
@@ -140,41 +139,12 @@ public class WifiPasspointManager {
* The operation failed
*
* @param reason The reason for failure could be one of
- * {@link #WIFI_DISABLED}, {@link #ERROR} or {@link #BUSY}
+ * {@link #REASON_WIFI_DISABLED}, {@link #REASON_ERROR} or {@link #REASON_BUSY}
*/
public void onFailure(int reason);
}
/**
- * Interface for callback invocation when doing OSU or user remediation
- */
- public interface OsuRemListener {
- /** The operation succeeded */
- public void onSuccess();
-
- /**
- * The operation failed
- *
- * @param reason The reason for failure could be one of
- * {@link #WIFI_DISABLED}, {@link #ERROR} or {@link #BUSY}
- */
- public void onFailure(int reason);
-
- /**
- * Browser launch is requried for user interaction. When this callback
- * is called, app should launch browser / webview to the given URI.
- *
- * @param uri URI for browser launch
- */
- public void onBrowserLaunch(String uri);
-
- /**
- * When this is called, app should dismiss the previously lanched browser.
- */
- public void onBrowserDismiss();
- }
-
- /**
* 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}
@@ -317,31 +287,6 @@ public class WifiPasspointManager {
}
break;
- case START_OSU_SUCCEEDED:
- listener = getListener(message.arg2, true);
- if (listener != null) {
- ((OsuRemListener) listener).onSuccess();
- }
- break;
-
- case START_OSU_FAILED:
- listener = getListener(message.arg2, true);
- if (listener != null) {
- ((OsuRemListener) listener).onFailure(message.arg1);
- }
- break;
-
- case START_OSU_BROWSER:
- listener = peekListener(message.arg2);
- if (listener != null) {
- ParcelableString str = (ParcelableString) message.obj;
- if (str == null || str.string == null)
- ((OsuRemListener) listener).onBrowserDismiss();
- else
- ((OsuRemListener) listener).onBrowserLaunch(str.string);
- }
- break;
-
default:
Log.d(TAG, "Ignored " + message);
break;
@@ -443,14 +388,6 @@ public class WifiPasspointManager {
}
}
- public int getPasspointState() {
- try {
- return mService.getPasspointState();
- } catch (RemoteException e) {
- return PASSPOINT_STATE_UNKNOWN;
- }
- }
-
public void requestAnqpInfo(Channel c, List<ScanResult> requested, int mask,
ActionListener listener) {
Log.d(TAG, "requestAnqpInfo start");
@@ -477,90 +414,6 @@ public class WifiPasspointManager {
Log.d(TAG, "requestAnqpInfo end");
}
- public void requestOsuIcons(Channel c, List<WifiPasspointOsuProvider> requested,
- int resolution, ActionListener listener) {
- }
-
- public List<WifiPasspointPolicy> requestCredentialMatch(List<ScanResult> requested) {
- try {
- return mService.requestCredentialMatch(requested);
- } catch (RemoteException e) {
- return null;
- }
- }
-
- /**
- * Get a list of saved Passpoint credentials. Only those credentials owned
- * by the caller will be returned.
- *
- * @return The list of credentials
- */
- public List<WifiPasspointCredential> getCredentials() {
- try {
- return mService.getCredentials();
- } catch (RemoteException e) {
- return null;
- }
- }
-
- /**
- * Add a new Passpoint credential.
- *
- * @param cred The credential to be added
- * @return {@code true} if the operation succeeds, {@code false} otherwise
- */
- public boolean addCredential(WifiPasspointCredential cred) {
- try {
- return mService.addCredential(cred);
- } catch (RemoteException e) {
- return false;
- }
- }
-
- /**
- * 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(WifiPasspointCredential cred) {
- try {
- return mService.updateCredential(cred);
- } catch (RemoteException e) {
- return false;
- }
- }
-
- /**
- * 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(WifiPasspointCredential cred) {
- try {
- return mService.removeCredential(cred);
- } catch (RemoteException e) {
- return false;
- }
- }
-
- public void startOsu(Channel c, WifiPasspointOsuProvider osu, OsuRemListener listener) {
- Log.d(TAG, "startOsu start");
- checkChannel(c);
- int key = c.putListener(listener);
- c.mAsyncChannel.sendMessage(START_OSU, 0, key, osu);
- Log.d(TAG, "startOsu end");
- }
-
- public void startRemediation(Channel c, OsuRemListener listener) {
- }
-
- public void connect(WifiPasspointPolicy policy) {
- }
-
private static void checkChannel(Channel c) {
if (c == null) throw new IllegalArgumentException("Channel needs to be initialized");
}