diff options
author | Vinit Deshpande <vinitd@google.com> | 2014-08-08 14:46:56 -0700 |
---|---|---|
committer | Vinit Deshpande <vinitd@google.com> | 2014-08-10 19:30:00 +0000 |
commit | 894651bab56bfcfa2ecb35dfac262f2590ff483d (patch) | |
tree | 83357b4b2268901dcdc8229d274f8b5c48da1e8a /wifi/java/android | |
parent | d18a1da18d1f92acc2669f936da00cd66657e44b (diff) | |
download | frameworks_base-894651bab56bfcfa2ecb35dfac262f2590ff483d.zip frameworks_base-894651bab56bfcfa2ecb35dfac262f2590ff483d.tar.gz frameworks_base-894651bab56bfcfa2ecb35dfac262f2590ff483d.tar.bz2 |
Unhide WifiPasspointManager for ANQP APIs - DO NOT MERGE
This is unhiding some unwanted changes too; but we'll fix that later.
Change-Id: I35343815e99aafbec8e4ef4d0707499fb6219457
Diffstat (limited to 'wifi/java/android')
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"); } |