summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorOscar Shu <xshu@google.com>2018-07-30 17:08:53 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2018-07-30 17:08:53 +0000
commit886469d39b1cc3d709d655ef8905884dd4544069 (patch)
treeacf92927c49ab102a1dfaa3c2792686a08be819c /service
parent6833b1111538cd2751a590399d078dcf6ea3ec29 (diff)
parentad4d342474ae1e54e4667d9f6a054d0c764a1c28 (diff)
Merge "Packet fate: create new event for timeout"
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/BaseWifiDiagnostics.java1
-rw-r--r--service/java/com/android/server/wifi/ClientModeImpl.java2
-rw-r--r--service/java/com/android/server/wifi/LastMileLogger.java7
3 files changed, 7 insertions, 3 deletions
diff --git a/service/java/com/android/server/wifi/BaseWifiDiagnostics.java b/service/java/com/android/server/wifi/BaseWifiDiagnostics.java
index 3b4c72bf7..85fdb6b0d 100644
--- a/service/java/com/android/server/wifi/BaseWifiDiagnostics.java
+++ b/service/java/com/android/server/wifi/BaseWifiDiagnostics.java
@@ -11,6 +11,7 @@ public class BaseWifiDiagnostics {
public static final byte CONNECTION_EVENT_STARTED = 0;
public static final byte CONNECTION_EVENT_SUCCEEDED = 1;
public static final byte CONNECTION_EVENT_FAILED = 2;
+ public static final byte CONNECTION_EVENT_TIMEOUT = 3;
protected final WifiNative mWifiNative;
diff --git a/service/java/com/android/server/wifi/ClientModeImpl.java b/service/java/com/android/server/wifi/ClientModeImpl.java
index f56081922..e7f71b331 100644
--- a/service/java/com/android/server/wifi/ClientModeImpl.java
+++ b/service/java/com/android/server/wifi/ClientModeImpl.java
@@ -3588,7 +3588,7 @@ public class ClientModeImpl extends StateMachine {
break;
case CMD_DIAGS_CONNECT_TIMEOUT:
mWifiDiagnostics.reportConnectionEvent(
- (Long) message.obj, BaseWifiDiagnostics.CONNECTION_EVENT_FAILED);
+ (Long) message.obj, BaseWifiDiagnostics.CONNECTION_EVENT_TIMEOUT);
break;
case CMD_GET_ALL_MATCHING_CONFIGS:
replyToMessage(message, message.what, new ArrayList<WifiConfiguration>());
diff --git a/service/java/com/android/server/wifi/LastMileLogger.java b/service/java/com/android/server/wifi/LastMileLogger.java
index 670923a70..35ce73677 100644
--- a/service/java/com/android/server/wifi/LastMileLogger.java
+++ b/service/java/com/android/server/wifi/LastMileLogger.java
@@ -64,10 +64,14 @@ public class LastMileLogger {
disableTracing();
return;
case BaseWifiDiagnostics.CONNECTION_EVENT_FAILED:
+ mPendingConnectionId = -1;
+ disableTracing();
+ mLastMileLogForLastFailure = readTrace();
+ return;
+ case BaseWifiDiagnostics.CONNECTION_EVENT_TIMEOUT:
if (connectionId >= mPendingConnectionId) {
mPendingConnectionId = -1;
disableTracing();
- mLastMileLogForLastFailure = readTrace();
return;
} else {
// Spurious failure message. Here's one scenario where this might happen:
@@ -88,7 +92,6 @@ public class LastMileLogger {
public void dump(PrintWriter pw) {
dumpInternal(pw, "Last failed last-mile log", mLastMileLogForLastFailure);
dumpInternal(pw, "Latest last-mile log", readTrace());
- mLastMileLogForLastFailure = null;
}
private static final String TAG = "LastMileLogger";