diff options
author | Roshan Pius <rpius@google.com> | 2020-05-13 04:09:35 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-05-13 04:09:35 +0000 |
commit | e68b566d2b8c728a481ece9a741ea75af1d9443d (patch) | |
tree | fecf1d3405f55e0ac40ee2c6748714788a7defcc /service | |
parent | 97a59a3dbe6ec2621ac42b922eaf22d743a1ec3f (diff) | |
parent | 2235246db04c30b55b4cf8bea00e7d48852d3bd6 (diff) |
ClientModeImpl: Ignore NETWORK_CONNECTION_EVENT while disconnecting am: 5ea8ed1787 am: 2235246db0
Change-Id: I9794ce7aefbf0d3d7e1bb2efa1e6d702e51ca9a8
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/ClientModeImpl.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/ClientModeImpl.java b/service/java/com/android/server/wifi/ClientModeImpl.java index 879b98d13..71a8cc613 100644 --- a/service/java/com/android/server/wifi/ClientModeImpl.java +++ b/service/java/com/android/server/wifi/ClientModeImpl.java @@ -4590,28 +4590,33 @@ public class ClientModeImpl extends StateMachine { @Override public void onStartSocketKeepalive(int slot, @NonNull Duration interval, @NonNull KeepalivePacketData packet) { + if (this != mNetworkAgent) return; ClientModeImpl.this.sendMessage( CMD_START_IP_PACKET_OFFLOAD, slot, (int) interval.getSeconds(), packet); } @Override public void onStopSocketKeepalive(int slot) { + if (this != mNetworkAgent) return; ClientModeImpl.this.sendMessage(CMD_STOP_IP_PACKET_OFFLOAD, slot); } @Override public void onAddKeepalivePacketFilter(int slot, @NonNull KeepalivePacketData packet) { + if (this != mNetworkAgent) return; ClientModeImpl.this.sendMessage( CMD_ADD_KEEPALIVE_PACKET_FILTER_TO_APF, slot, 0, packet); } @Override public void onRemoveKeepalivePacketFilter(int slot) { + if (this != mNetworkAgent) return; ClientModeImpl.this.sendMessage(CMD_REMOVE_KEEPALIVE_PACKET_FILTER_FROM_APF, slot); } @Override public void onSignalStrengthThresholdsUpdated(@NonNull int[] thresholds) { + if (this != mNetworkAgent) return; // 0. If there are no thresholds, or if the thresholds are invalid, // stop RSSI monitoring. // 1. Tell the hardware to start RSSI monitoring here, possibly adding MIN_VALUE and @@ -4725,6 +4730,7 @@ public class ClientModeImpl extends StateMachine { // This should never happen. if (mNetworkAgent != null) { Log.wtf(TAG, "mNetworkAgent is not null: " + mNetworkAgent); + mNetworkAgent.unregister(); } mNetworkAgent = new WifiNetworkAgent(mContext, getHandler().getLooper(), "WifiNetworkAgent", nc, mLinkProperties, 60, naConfig, @@ -5568,6 +5574,11 @@ public class ClientModeImpl extends StateMachine { log("Ignore CMD_DISCONNECT when already disconnecting."); } break; + case WifiMonitor.NETWORK_CONNECTION_EVENT: + if (mVerboseLoggingEnabled) { + log("Ignore NETWORK_CONNECTION_EVENT when already disconnecting."); + } + break; case CMD_DISCONNECTING_WATCHDOG_TIMER: if (mDisconnectingWatchdogCount == message.arg1) { if (mVerboseLoggingEnabled) log("disconnecting watchdog! -> disconnect"); |