Merge "Start to count the init time from calling updateState function" into tm-dev am: 9f4fb486d8 am: dc2a680bea am: 863abc6c0d

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18400689

Change-Id: I53128b4079d75b1faa15a961e6b1dc4b70f8cc7e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
TreeHugger Robot
2022-05-19 09:56:59 +00:00
committed by Automerger Merge Worker

View File

@@ -313,9 +313,8 @@ final class HotwordDetectionConnection {
// TODO: (b/181842909) Report an error to voice interactor // TODO: (b/181842909) Report an error to voice interactor
Slog.w(TAG, "Failed to updateState for HotwordDetectionService", e); Slog.w(TAG, "Failed to updateState for HotwordDetectionService", e);
} }
return future; return future.orTimeout(MAX_UPDATE_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS);
}).orTimeout(MAX_UPDATE_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS) }).whenComplete((res, err) -> {
.whenComplete((res, err) -> {
if (err instanceof TimeoutException) { if (err instanceof TimeoutException) {
Slog.w(TAG, "updateState timed out"); Slog.w(TAG, "updateState timed out");
if (mUpdateStateAfterStartFinished.getAndSet(true)) { if (mUpdateStateAfterStartFinished.getAndSet(true)) {