diff options
author | joethhuang <joethhuang@google.com> | 2018-12-22 15:16:56 +0800 |
---|---|---|
committer | Joe Huang <joethhuang@google.com> | 2018-12-22 10:32:57 +0000 |
commit | a07f1b1f1b51980d53664a833d6da86601223e96 (patch) | |
tree | eef0597452ba4b523533ee23831fe1554ed3b532 | |
parent | f14c1ac49997647ac74246eca01dc67bdb2e93c8 (diff) | |
download | gps-pie-qpr3-b-release.tar.gz |
GNSS_NI_RESPONSE_IGNORE handlingandroid-9.0.0_r47android-9.0.0_r46android-9.0.0_r45android-9.0.0_r44android-9.0.0_r43android-9.0.0_r42pie-qpr3-releasepie-qpr3-b-releasepie-b4s4-dev
CRs-Fixed: 2296845
GNSS_NI_RESPONSE_IGNORE inadvertently mapped to NO_RESPONSE,
which is a different reponse code. These two should be handled
differently.
Bug: 112623078
Test: Verified successfully in CGC lab.
Change-Id: I35d8550d0e0614c890f91ea6cbc25228c80890ee
-rw-r--r-- | sdm845/android/location_api/GnssAPIClient.cpp | 19 |
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); } |