diff options
author | Vinit Deshpande <vinitd@google.com> | 2014-08-29 13:16:40 -0700 |
---|---|---|
committer | Vinit Deshpande <vinitd@google.com> | 2014-08-29 14:17:19 -0700 |
commit | e0441cfc07851d8d92779fc6276c6c68a0ea8adf (patch) | |
tree | 5dccd5b10c95e11852414acc6428ba7d778472a6 | |
parent | 8dade422e50a6bc0916f95ab42cf0e128ff42046 (diff) | |
download | packages_apps_Settings-e0441cfc07851d8d92779fc6276c6c68a0ea8adf.zip packages_apps_Settings-e0441cfc07851d8d92779fc6276c6c68a0ea8adf.tar.gz packages_apps_Settings-e0441cfc07851d8d92779fc6276c6c68a0ea8adf.tar.bz2 |
Address API Council feedback for WifiAdapter/WPS APIs
This change addresses concerns from the API review. Things that
are fixed are -
1. WifiAdapter is removed, until we have 'real' support for it
2. All the methods from WifiAdapter are moved to WifiManager
3. Changed WPSListener API names to be onFailed/onSucceeded et al
4. Removed ActionListener from WPS APIs, they now take WpsListener
Bug: 16403303
Bug: 17115004
Change-Id: I609c42f08b52f77240ce9a97b1a9941a9c154752
-rw-r--r-- | src/com/android/settings/wifi/WpsDialog.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/com/android/settings/wifi/WpsDialog.java b/src/com/android/settings/wifi/WpsDialog.java index 662d477..d0b116b 100644 --- a/src/com/android/settings/wifi/WpsDialog.java +++ b/src/com/android/settings/wifi/WpsDialog.java @@ -57,7 +57,7 @@ public class WpsDialog extends AlertDialog { private static final int WPS_TIMEOUT_S = 120; private WifiManager mWifiManager; - private WifiManager.WpsListener mWpsListener; + private WifiManager.WpsCallback mWpsListener; private int mWpsSetup; private final IntentFilter mFilter; @@ -81,8 +81,9 @@ public class WpsDialog extends AlertDialog { mContext = context; mWpsSetup = wpsSetup; - class WpsListener implements WifiManager.WpsListener { - public void onStartSuccess(String pin) { + class WpsListener extends WifiManager.WpsCallback { + + public void onStarted(String pin) { if (pin != null) { updateDialog(DialogState.WPS_START, String.format( mContext.getString(R.string.wifi_wps_onstart_pin), pin)); @@ -91,12 +92,13 @@ public class WpsDialog extends AlertDialog { R.string.wifi_wps_onstart_pbc)); } } - public void onCompletion() { + + public void onSucceeded() { updateDialog(DialogState.WPS_COMPLETE, mContext.getString(R.string.wifi_wps_complete)); } - public void onFailure(int reason) { + public void onFailed(int reason) { String msg; switch (reason) { case WifiManager.WPS_OVERLAP_ERROR: |