summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNalla Kartheek <karthe@codeaurora.org>2015-12-23 14:57:31 +0530
committerSteve Kondik <steve@cyngn.com>2016-06-24 11:28:49 -1000
commit6c7911a4f7f0d450e3cbff3466f9208800cec752 (patch)
tree3cbcbef86223e349778b6fd343b842b4408c0789
parent88db18ef62513cd7d9199cbb28b3ee3a169d143a (diff)
downloadframeworks_opt_net_wifi-6c7911a4f7f0d450e3cbff3466f9208800cec752.tar.gz
frameworks_opt_net_wifi-6c7911a4f7f0d450e3cbff3466f9208800cec752.tar.bz2
frameworks_opt_net_wifi-6c7911a4f7f0d450e3cbff3466f9208800cec752.zip
Wifi: Clear lastConnectAttemptTimestamp variable on a Wifi turn off
Framework shall defer the SCAN request if issued with in 10 seconds after the last connect attempt. This logic is driven by lastConnectAttemptTimestamp, which holds the last connection attempt's time stamp. For a scenario where a WiFi is turned off during the connection attempt, this variable ended up retaining the last connection time stamp and thus, the first scan after the WiFi turn on gets deferred, if the attempt happens with in 10 seconds, resulting in a delay to display the scan results after the Turn ON. Hence clear lastConnectAttemptTimestamp variable, when wifi is turned off. Change-Id: Ib3f306ba38debd95e047cd2ef2fdadf8d9fe3367 CRs-Fixed: 955289
-rw-r--r--service/java/com/android/server/wifi/WifiStateMachine.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/WifiStateMachine.java b/service/java/com/android/server/wifi/WifiStateMachine.java
index 0aca11e..5137527 100644
--- a/service/java/com/android/server/wifi/WifiStateMachine.java
+++ b/service/java/com/android/server/wifi/WifiStateMachine.java
@@ -6016,6 +6016,7 @@ public class WifiStateMachine extends StateMachine implements WifiNative.WifiPno
public void enter() {
WifiNative.stopHal();
mWifiNative.unloadDriver();
+ lastConnectAttemptTimestamp = 0;
if (mWifiP2pChannel == null) {
mWifiP2pChannel = new AsyncChannel();
mWifiP2pChannel.connect(mContext, getHandler(),