From f57ad9ba5c049329c2f173e32ea0b5eb5caea00b Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Wed, 27 Nov 2019 16:04:52 -0800 Subject: [PATCH] vibrator impl: log failed callback As help/sanity check when debugging. Bug: N/A Test: N/A Change-Id: Ia45be148f1e6aebdb880d7da68d5b8bec8485127 --- vibrator/aidl/default/Vibrator.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vibrator/aidl/default/Vibrator.cpp b/vibrator/aidl/default/Vibrator.cpp index a77c49a0a2..befdeab08a 100644 --- a/vibrator/aidl/default/Vibrator.cpp +++ b/vibrator/aidl/default/Vibrator.cpp @@ -48,7 +48,9 @@ ndk::ScopedAStatus Vibrator::on(int32_t timeoutMs, LOG(INFO) << "Starting on on another thread"; usleep(timeoutMs * 1000); LOG(INFO) << "Notifying on complete"; - callback->onComplete(); + if (!callback->onComplete().isOk()) { + LOG(ERROR) << "Failed to call onComplete"; + } }).detach(); } return ndk::ScopedAStatus::ok();