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
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user