summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorDavid Su <dysu@google.com>2020-06-16 22:15:07 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-06-16 22:15:07 +0000
commitc4d7ad413909b181fd59b595dc66d7d6d39aa684 (patch)
tree3c16981d8a0ea9da1f63a7f0f3367e50167874a7 /service
parentf8af7fe1c4144329221566da6b13ee6ab555c10c (diff)
parentfc132e8df75297ece1f83a0bfa64a5d0141c359b (diff)
Merge "RESTRICT AUTOMERGE Send out WIFI_CREDENTIAL_CHANGED_ACTION on WifiManager#forget() success" into rvc-dev
Diffstat (limited to 'service')
-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);
});
}