Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ed1b4596 authored by Erik Kline's avatar Erik Kline
Browse files

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
parent df499d5d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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() {