From 9fe73f379ae1678bb1b0c321bc48f0941e278b55 Mon Sep 17 00:00:00 2001 From: Yingjie Wang Date: Tue, 21 Nov 2017 12:17:26 +0800 Subject: [PATCH] Check ret value for HIDL callback method Judge ret value for niNotifyCb to check HIDL return status Change-Id: I0cde3716a971941260f2fb12c9e5927bc8c8d548 CRs-fixed: 2147437 --- android/location_api/GnssAPIClient.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/android/location_api/GnssAPIClient.cpp b/android/location_api/GnssAPIClient.cpp index 2745f56e..4d0ca3b1 100644 --- a/android/location_api/GnssAPIClient.cpp +++ b/android/location_api/GnssAPIClient.cpp @@ -405,7 +405,11 @@ void GnssAPIClient::onGnssNiCb(uint32_t id, GnssNiNotification gnssNiNotificatio notificationGnss.notificationIdEncoding = IGnssNiCallback::GnssNiEncodingType::ENC_SUPL_UCS2; - gnssNiCbIface->niNotifyCb(notificationGnss); + auto r = gnssNiCbIface->niNotifyCb(notificationGnss); + if (!r.isOk()) { + LOC_LOGE("%s] Error from niNotifyCb description=%s", + __func__, r.description().c_str()); + } } void GnssAPIClient::onGnssSvCb(GnssSvNotification gnssSvNotification)