Loading res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -1756,6 +1756,8 @@ <string name="wifi_wps_failed_auth">Authentication failure. Please try again.</string> <!-- Text displayed when WPS fails due to another session [CHAR LIMIT=150] --> <string name="wifi_wps_failed_overlap">Another WPS session was detected. Please try again in a few minutes.</string> <!-- Text displayed when WPS fails due to wifi disconnected [CHAR LIMIT=150] --> <string name="wifi_wps_failed_wifi_disconnected">Wi\u2011Fi disconnected. WPS setup canceled.</string> <!-- Label for the SSID of the network --> <string name="wifi_ssid">Network name</string> <!-- Hint for a text field to enter the SSID of a hidden wifi network. [CHAR LIMIT=35] --> Loading src/com/android/settings/wifi/WpsDialog.java +13 −1 Original line number Diff line number Diff line Loading @@ -125,6 +125,7 @@ public class WpsDialog extends AlertDialog { mFilter = new IntentFilter(); mFilter.addAction(WifiManager.WIFI_STATE_CHANGED_ACTION); mFilter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION); mReceiver = new BroadcastReceiver() { @Override Loading Loading @@ -261,7 +262,18 @@ public class WpsDialog extends AlertDialog { private void handleEvent(Context context, Intent intent) { String action = intent.getAction(); if (WifiManager.NETWORK_STATE_CHANGED_ACTION.equals(action)) { if (WifiManager.WIFI_STATE_CHANGED_ACTION.equals(action)) { final int state = intent.getIntExtra(WifiManager.EXTRA_WIFI_STATE, WifiManager.WIFI_STATE_UNKNOWN); if (state == WifiManager.WIFI_STATE_DISABLED) { if (mTimer != null) { mTimer.cancel(); mTimer = null; } String msg = mContext.getString(R.string.wifi_wps_failed_wifi_disconnected); updateDialog(DialogState.WPS_FAILED, msg); } } else if (WifiManager.NETWORK_STATE_CHANGED_ACTION.equals(action)) { NetworkInfo info = (NetworkInfo) intent.getParcelableExtra( WifiManager.EXTRA_NETWORK_INFO); final NetworkInfo.DetailedState state = info.getDetailedState(); Loading Loading
res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -1756,6 +1756,8 @@ <string name="wifi_wps_failed_auth">Authentication failure. Please try again.</string> <!-- Text displayed when WPS fails due to another session [CHAR LIMIT=150] --> <string name="wifi_wps_failed_overlap">Another WPS session was detected. Please try again in a few minutes.</string> <!-- Text displayed when WPS fails due to wifi disconnected [CHAR LIMIT=150] --> <string name="wifi_wps_failed_wifi_disconnected">Wi\u2011Fi disconnected. WPS setup canceled.</string> <!-- Label for the SSID of the network --> <string name="wifi_ssid">Network name</string> <!-- Hint for a text field to enter the SSID of a hidden wifi network. [CHAR LIMIT=35] --> Loading
src/com/android/settings/wifi/WpsDialog.java +13 −1 Original line number Diff line number Diff line Loading @@ -125,6 +125,7 @@ public class WpsDialog extends AlertDialog { mFilter = new IntentFilter(); mFilter.addAction(WifiManager.WIFI_STATE_CHANGED_ACTION); mFilter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION); mReceiver = new BroadcastReceiver() { @Override Loading Loading @@ -261,7 +262,18 @@ public class WpsDialog extends AlertDialog { private void handleEvent(Context context, Intent intent) { String action = intent.getAction(); if (WifiManager.NETWORK_STATE_CHANGED_ACTION.equals(action)) { if (WifiManager.WIFI_STATE_CHANGED_ACTION.equals(action)) { final int state = intent.getIntExtra(WifiManager.EXTRA_WIFI_STATE, WifiManager.WIFI_STATE_UNKNOWN); if (state == WifiManager.WIFI_STATE_DISABLED) { if (mTimer != null) { mTimer.cancel(); mTimer = null; } String msg = mContext.getString(R.string.wifi_wps_failed_wifi_disconnected); updateDialog(DialogState.WPS_FAILED, msg); } } else if (WifiManager.NETWORK_STATE_CHANGED_ACTION.equals(action)) { NetworkInfo info = (NetworkInfo) intent.getParcelableExtra( WifiManager.EXTRA_NETWORK_INFO); final NetworkInfo.DetailedState state = info.getDetailedState(); Loading