diff options
author | Roshan Pius <rpius@google.com> | 2018-03-22 09:28:06 -0700 |
---|---|---|
committer | Roshan Pius <rpius@google.com> | 2018-03-22 09:37:13 -0700 |
commit | b195838541edf2597659b217291079c52623d85c (patch) | |
tree | c5bd01328226ee15f88cd361ad7862ae1573f534 /service | |
parent | ee4e4d484fc699eea1492538b68c125782e57883 (diff) |
WifiMetrics: Send a different error code for assoc timeout
Note: This and all the other connection failure codes should be moved to the
proto file.
Bug: 34280407
Test: Unit tests
Change-Id: I1d8842475b3cadb15abebe60c612f685b7397ae0
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiMetrics.java | 6 | ||||
-rw-r--r-- | service/java/com/android/server/wifi/WifiStateMachine.java | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/service/java/com/android/server/wifi/WifiMetrics.java b/service/java/com/android/server/wifi/WifiMetrics.java index 992182686..f899ac105 100644 --- a/service/java/com/android/server/wifi/WifiMetrics.java +++ b/service/java/com/android/server/wifi/WifiMetrics.java @@ -281,6 +281,8 @@ public class WifiMetrics { public static final int FAILURE_ROAM_TIMEOUT = 9; // DHCP failure public static final int FAILURE_DHCP = 10; + // ASSOCIATION_TIMED_OUT + public static final int FAILURE_ASSOCIATION_TIMED_OUT = 11; RouterFingerPrint mRouterFingerPrint; private long mRealStartTime; @@ -369,6 +371,10 @@ public class WifiMetrics { break; case FAILURE_DHCP: sb.append("DHCP"); + break; + case FAILURE_ASSOCIATION_TIMED_OUT: + sb.append("ASSOCIATION_TIMED_OUT"); + break; default: sb.append("UNKNOWN"); break; diff --git a/service/java/com/android/server/wifi/WifiStateMachine.java b/service/java/com/android/server/wifi/WifiStateMachine.java index 38c2cd428..4bcb8d2e1 100644 --- a/service/java/com/android/server/wifi/WifiStateMachine.java +++ b/service/java/com/android/server/wifi/WifiStateMachine.java @@ -4305,7 +4305,9 @@ public class WifiStateMachine extends StateMachine { mSupplicantStateTracker.sendMessage(WifiMonitor.ASSOCIATION_REJECTION_EVENT); // If rejection occurred while Metrics is tracking a ConnnectionEvent, end it. reportConnectionAttemptEnd( - WifiMetrics.ConnectionEvent.FAILURE_ASSOCIATION_REJECTION, + timedOut + ? WifiMetrics.ConnectionEvent.FAILURE_ASSOCIATION_TIMED_OUT + : WifiMetrics.ConnectionEvent.FAILURE_ASSOCIATION_REJECTION, WifiMetricsProto.ConnectionEvent.HLF_NONE); mWifiInjector.getWifiLastResortWatchdog() .noteConnectionFailureAndTriggerIfNeeded( |