diff options
| author | 2015-06-24 20:02:20 +0900 | |
|---|---|---|
| committer | 2015-06-24 20:02:20 +0900 | |
| commit | ed1b45968edb11ce8dc5c1d5a5db09d943e8d425 (patch) | |
| tree | 4525dd68c3113d138e7bc6c3b6e923c6429fbb3f | |
| parent | df499d5d3b595a9b582a75e93f01ab8860c8a62b (diff) | |
Don't lose critical success/failure messages
Occasionally, "dumpsys connectivity --diag" will show measurement
results without success or failure messages. Properly record the
error before decrementing the countdown latch.
Bug: 20733156
Change-Id: Ic654dedb753a65a96fe870f79fb296fbfc459fcb
| -rw-r--r-- | services/core/java/com/android/server/connectivity/NetworkDiagnostics.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java b/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java index 5d56d4aeb885..74ba404eb0ee 100644 --- a/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java +++ b/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java @@ -113,18 +113,18 @@ public class NetworkDiagnostics { public void recordSuccess(String msg) { maybeFixupTimes(); + result = SUCCEEDED + ": " + msg; if (mCountDownLatch != null) { mCountDownLatch.countDown(); } - result = SUCCEEDED + ": " + msg; } public void recordFailure(String msg) { maybeFixupTimes(); + result = FAILED + ": " + msg; if (mCountDownLatch != null) { mCountDownLatch.countDown(); } - result = FAILED + ": " + msg; } private void maybeFixupTimes() { |