summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--service/java/com/android/server/wifi/ClientModeImpl.java14
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 18d8f7a67..f09218ab9 100644
--- a/service/java/com/android/server/wifi/ClientModeImpl.java
+++ b/service/java/com/android/server/wifi/ClientModeImpl.java
@@ -5807,14 +5807,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) {
@@ -6239,13 +6238,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);
});
}