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

Commit 8de82684 authored by lpeter's avatar lpeter
Browse files

Start to count the init time from calling updateState function

Bug: 233011234
Test: atest HotwordDetectionServiceBasicTest
Change-Id: Ie2e426cb6f6168a2a704dd934d949047436e7826
parent c7c60d5e
Loading
Loading
Loading
Loading
+22 −23
Original line number Diff line number Diff line
@@ -315,9 +315,8 @@ final class HotwordDetectionConnection {
                // TODO: (b/181842909) Report an error to voice interactor
                Slog.w(TAG, "Failed to updateState for HotwordDetectionService", e);
            }
            return future;
        }).orTimeout(MAX_UPDATE_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS)
                .whenComplete((res, err) -> {
            return future.orTimeout(MAX_UPDATE_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS);
        }).whenComplete((res, err) -> {
            if (err instanceof TimeoutException) {
                Slog.w(TAG, "updateState timed out");
                if (mUpdateStateAfterStartFinished.getAndSet(true)) {