summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2018-12-23 23:05:36 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2018-12-23 23:05:36 +0000
commitf1f69e3e96ea1c898d3208f1b6ccea3d668afaf8 (patch)
treeeef0597452ba4b523533ee23831fe1554ed3b532
parentb889a608fb595522a52e5e79d222202be629e941 (diff)
parenta07f1b1f1b51980d53664a833d6da86601223e96 (diff)
downloadgps-pie-b4s4-release.tar.gz
Snap for 5198920 from a07f1b1f1b51980d53664a833d6da86601223e96 to pi-b4s4-releaseandroid-9.0.0_r39android-9.0.0_r38pie-b4s4-release
Change-Id: I8d44967f3b8309b873dad5705657909b647ccfa4
-rw-r--r--sdm845/android/location_api/GnssAPIClient.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/sdm845/android/location_api/GnssAPIClient.cpp b/sdm845/android/location_api/GnssAPIClient.cpp
index f6efd96..61b8b38 100644
--- a/sdm845/android/location_api/GnssAPIClient.cpp
+++ b/sdm845/android/location_api/GnssAPIClient.cpp
@@ -194,17 +194,22 @@ void GnssAPIClient::gnssNiRespond(int32_t notifId,
IGnssNiCallback::GnssUserResponseType userResponse)
{
LOC_LOGD("%s]: (%d %d)", __FUNCTION__, notifId, static_cast<int>(userResponse));
- GnssNiResponse data = GNSS_NI_RESPONSE_IGNORE;
- if (userResponse == IGnssNiCallback::GnssUserResponseType::RESPONSE_ACCEPT)
+ GnssNiResponse data;
+ switch (userResponse) {
+ case IGnssNiCallback::GnssUserResponseType::RESPONSE_ACCEPT:
data = GNSS_NI_RESPONSE_ACCEPT;
- else if (userResponse == IGnssNiCallback::GnssUserResponseType::RESPONSE_DENY)
+ break;
+ case IGnssNiCallback::GnssUserResponseType::RESPONSE_DENY:
data = GNSS_NI_RESPONSE_DENY;
- else if (userResponse == IGnssNiCallback::GnssUserResponseType::RESPONSE_NORESP)
+ break;
+ case IGnssNiCallback::GnssUserResponseType::RESPONSE_NORESP:
data = GNSS_NI_RESPONSE_NO_RESPONSE;
- else {
- LOC_LOGD("%s]: invalid GnssUserResponseType: %d", __FUNCTION__, (int)userResponse);
- return;
+ break;
+ default:
+ data = GNSS_NI_RESPONSE_IGNORE;
+ break;
}
+
locAPIGnssNiResponse(notifId, data);
}