Fix bugs due to failure requesting search-place 19/144919/4 accepted/tizen/4.0/unified/20170829.020328 accepted/tizen/unified/20170822.023738 submit/tizen/20170821.023137 submit/tizen_4.0/20170828.100004 submit/tizen_4.0/20170828.110004
authorchanywa <cbible.kim@samsung.com>
Fri, 18 Aug 2017 09:48:59 +0000 (18:48 +0900)
committerSeechan Kim <cbible.kim@samsung.com>
Fri, 18 Aug 2017 10:13:19 +0000 (10:13 +0000)
Change-Id: I0ec1d32bf9dd2da5db0d3ecceb5e0ef92871549c

maps-plugin-here.changes
packaging/maps-plugin-here.spec
src/here_place.cpp
src/here_userconsent.cpp

index e3c489c..71d5aa0 100644 (file)
@@ -1,3 +1,8 @@
+[Version]   maps-plugin-here_0.3.28
+[Date]      18 Aug 2017
+[Title]     Fix bugs due to failure requesting search-place.
+[Developer] Seechan Kim <cbible.kim@samsung.com>
+
 [Version]   maps-plugin-here_0.3.27
 [Date]      17 Aug 2017
 [Title]     Update heremaps-engine to prevent crashes
index 45c15c3..829b7d0 100644 (file)
@@ -1,6 +1,6 @@
 Name:       maps-plugin-here
 Summary:    Tizen HERE Maps Plug-in Library
-Version:    0.3.27
+Version:    0.3.28
 Release:    1
 Group:      Location/Libraries
 License:    Apache-2.0 and HERE
index a2082ea..81c528c 100644 (file)
@@ -360,6 +360,7 @@ void HerePlace::OnDiscoverReply(const DiscoveryReply &Reply)
        Category hereCate;
        maps_place_category_h mapsCate;
        maps_place_rating_h mapsRating;
+       std::vector<String> pendingUrlList;
        int error = MAPS_ERROR_UNKNOWN, sub_error;
        bool is_valid, isPending;
 
@@ -452,15 +453,14 @@ void HerePlace::OnDiscoverReply(const DiscoveryReply &Reply)
 
                        /* vicinity */
 
-                       /* If needed PlaceDetails information, postpone to send a reply */
+                       /* If needed PlaceDetails information, postpone what to reply */
                        if(__sending_place_details_query_automatically && !m_bReplyWithList) {
                                hereLinkObj = herePlaceIt->GetLinkObject();
                                if (!hereLinkObj.GetHref().empty() && !hereLinkObj.GetId().empty()) {
-                                       if (StartPlaceDetailsInternal(hereLinkObj.GetHref().c_str()) == HERE_ERROR_NONE) {
-                                               m_PlaceList.push_back(mapsPlace);
-                                               isPending = true;
-                                               MAPS_LOGD("Add maps_place_h to the pending list. id=%s", hereLinkObj.GetId().data());
-                                       }
+                                       isPending = true;
+                                       m_PlaceList.push_back(mapsPlace);
+                                       pendingUrlList.push_back(hereLinkObj.GetHref());
+                                       MAPS_LOGD("Add maps_place_h to the pending list. id=%s", hereLinkObj.GetId().data());
                                }
                        }
 
@@ -519,6 +519,13 @@ void HerePlace::OnDiscoverReply(const DiscoveryReply &Reply)
        }
 
 
+       if (pendingUrlList.size() > 0) {
+               std::vector<String>::iterator it;
+               for (it = pendingUrlList.begin(); it != pendingUrlList.end(); it++)
+                       StartPlaceDetailsInternal((*it).c_str());
+               return;
+       }
+
        if (!m_bReplyFlushed && (m_nReplyCnt == 0 || m_nReplyIdx == m_nReplyCnt)) {
                if (m_nReplyCnt == 0)
                        error = MAPS_ERROR_NOT_FOUND;
index fb5ac0b..7da2491 100644 (file)
@@ -76,6 +76,11 @@ HereUserConsent::~HereUserConsent()
 
 here_error_e HereUserConsent::GetUserConsent(bool *consent)
 {
+       if (ApplicationContext::GetInstance().GetUserConsent() == true) {
+               *consent = true;
+               return HERE_ERROR_NONE;
+       }
+
        const int testAppIdCount = 7;
        const char* testAppIdList[testAppIdCount] = {
                "org.tizen.capi-maps-service-native-utc",