From 08efa3c6c2359de9d50941421df79e74db7f4f40 Mon Sep 17 00:00:00 2001 From: Kevin Tang Date: Fri, 28 Apr 2017 16:21:53 -0700 Subject: [PATCH] Add handling of GNSS NI TYPE EMERGENCY Network Initiated type emergency was not being handled because it was missing from gnss hal api. Hardcoded value until it is added in gnss hal api. Change-Id: If0e538c3083e351bf642765eae88404ce6e0ae1b CRs-fixed: 2037093 --- android/location_api/GnssAPIClient.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/android/location_api/GnssAPIClient.cpp b/android/location_api/GnssAPIClient.cpp index a31de5de..99b801e9 100644 --- a/android/location_api/GnssAPIClient.cpp +++ b/android/location_api/GnssAPIClient.cpp @@ -280,7 +280,7 @@ void GnssAPIClient::onGnssNiCb(uint32_t id, GnssNiNotification gnssNiNotificatio return; } - IGnssNiCallback::GnssNiNotification notificationGnss; + IGnssNiCallback::GnssNiNotification notificationGnss = {}; notificationGnss.notificationId = id; @@ -290,7 +290,9 @@ void GnssAPIClient::onGnssNiCb(uint32_t id, GnssNiNotification gnssNiNotificatio notificationGnss.niType = IGnssNiCallback::GnssNiType::UMTS_SUPL; else if (gnssNiNotification.type == GNSS_NI_TYPE_CONTROL_PLANE) notificationGnss.niType = IGnssNiCallback::GnssNiType::UMTS_CTRL_PLANE; - // GNSS_NI_TYPE_EMERGENCY_SUPL not supported + else if (gnssNiNotification.type == GNSS_NI_TYPE_EMERGENCY_SUPL) + notificationGnss.niType = + static_cast(4/*hardcode until IGnssNiCallback adds value*/); if (gnssNiNotification.options == GNSS_NI_OPTIONS_NOTIFICATION) notificationGnss.notifyFlags =