summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorRebecca Silberstein <silberst@google.com>2018-05-09 22:19:11 -0700
committerRebecca Silberstein <silberst@google.com>2018-05-09 22:19:11 -0700
commitbf4a0d9b27116449470932b997dc885d833f5ce7 (patch)
tree3251b90ca30fe612db2d030d50a38b4c63b89d12 /service
parent43b4bb291800401b67daf50156f8d04c64569c21 (diff)
WifiStateMachine: send supplicant connection bcast
When tearing down client mode, add broadcast indicating that the supplicant connection state has changed. While this is often misused to indicate wifi connection state, we cannot remove it yet. The broadcast has been deprecated and will be removed in the future, but for now, we still send the broadcast at the start and end of client mode. Bug: 79477256 Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh Change-Id: Id5dc4f4debf653968d8dca702c42fef89a5ad642
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/WifiStateMachine.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/WifiStateMachine.java b/service/java/com/android/server/wifi/WifiStateMachine.java
index 4a0a24a21..4a51ffceb 100644
--- a/service/java/com/android/server/wifi/WifiStateMachine.java
+++ b/service/java/com/android/server/wifi/WifiStateMachine.java
@@ -2665,6 +2665,12 @@ public class WifiStateMachine extends StateMachine {
mContext.sendBroadcastAsUser(intent, UserHandle.ALL);
}
+ /**
+ * Helper method used to send state about supplicant - This is NOT information about the current
+ * wifi connection state.
+ *
+ * TODO: b/79504296 This broadcast has been deprecated and should be removed
+ */
private void sendSupplicantConnectionChangedBroadcast(boolean connected) {
Intent intent = new Intent(WifiManager.SUPPLICANT_CONNECTION_CHANGE_ACTION);
intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
@@ -3701,6 +3707,7 @@ public class WifiStateMachine extends StateMachine {
if (!mWifiConfigManager.migrateFromLegacyStore()) {
Log.e(TAG, "Failed to migrate from legacy config store");
}
+ // TODO: b/79504296 This broadcast has been deprecated and should be removed
sendSupplicantConnectionChangedBroadcast(true);
mWifiNative.setExternalSim(mInterfaceName, true);
@@ -3766,6 +3773,8 @@ public class WifiStateMachine extends StateMachine {
if (mNetworkAgent != null) mNetworkAgent.sendNetworkInfo(mNetworkInfo);
mCountryCode.setReadyForChange(false);
mInterfaceName = null;
+ // TODO: b/79504296 This broadcast has been deprecated and should be removed
+ sendSupplicantConnectionChangedBroadcast(false);
}
void registerConnected() {