diff options
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/ClientModeImpl.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/service/java/com/android/server/wifi/ClientModeImpl.java b/service/java/com/android/server/wifi/ClientModeImpl.java index e10d5367e..8036a0dcc 100644 --- a/service/java/com/android/server/wifi/ClientModeImpl.java +++ b/service/java/com/android/server/wifi/ClientModeImpl.java @@ -5794,14 +5794,13 @@ public class ClientModeImpl extends StateMachine { */ private void broadcastWifiCredentialChanged(int wifiCredentialEventType, WifiConfiguration config) { - if (config != null && config.preSharedKey != null) { - Intent intent = new Intent(WifiManager.WIFI_CREDENTIAL_CHANGED_ACTION); + Intent intent = new Intent(WifiManager.WIFI_CREDENTIAL_CHANGED_ACTION); + if (config != null && config.SSID != null) { intent.putExtra(WifiManager.EXTRA_WIFI_CREDENTIAL_SSID, config.SSID); - intent.putExtra(WifiManager.EXTRA_WIFI_CREDENTIAL_EVENT_TYPE, - wifiCredentialEventType); - mContext.sendBroadcastAsUser(intent, UserHandle.CURRENT, - android.Manifest.permission.RECEIVE_WIFI_CREDENTIAL_CHANGE); } + intent.putExtra(WifiManager.EXTRA_WIFI_CREDENTIAL_EVENT_TYPE, wifiCredentialEventType); + mContext.sendBroadcastAsUser(intent, UserHandle.CURRENT, + android.Manifest.permission.RECEIVE_WIFI_CREDENTIAL_CHANGE); } void handleGsmAuthRequest(SimAuthRequestData requestData) { @@ -6220,13 +6219,14 @@ public class ClientModeImpl extends StateMachine { if (callback != null && binder != null) { mProcessingActionListeners.add(binder, callback, callbackIdentifier); } + WifiConfiguration config = mWifiConfigManager.getConfiguredNetwork(netId); boolean success = mWifiConfigManager.removeNetwork(netId, callingUid, null); if (!success) { loge("Failed to remove network"); sendActionListenerFailure(callbackIdentifier, WifiManager.ERROR); } sendActionListenerSuccess(callbackIdentifier); - broadcastWifiCredentialChanged(WifiManager.WIFI_CREDENTIAL_FORGOT, null); + broadcastWifiCredentialChanged(WifiManager.WIFI_CREDENTIAL_FORGOT, config); }); } |