forked from organicmaps/organicmaps-tmp
[ugc][android] Fixed UGC bugs.
This commit is contained in:
parent
5a06158a71
commit
a291aa1b62
2 changed files with 6 additions and 5 deletions
|
@ -80,10 +80,10 @@ private:
|
|||
return;
|
||||
m_ugcClass = jni::GetGlobalClassRef(env, "com/mapswithme/maps/ugc/UGC");
|
||||
m_ugcCtor = jni::GetConstructorID(
|
||||
env, m_ratingClass,
|
||||
env, m_ugcClass,
|
||||
"([Lcom/mapswithme/maps/ugc/UGC$Rating;F[Lcom/mapswithme/maps/ugc/UGC$Review;)V");
|
||||
m_onResult =
|
||||
jni::GetMethodID(env, m_ugcClass, "onUGCReceived", "([Lcom/mapswithme/maps/ugc/UGC;)V");
|
||||
m_onResult = jni::GetStaticMethodID(env, m_ugcClass, "onUGCReceived",
|
||||
"(Lcom/mapswithme/maps/ugc/UGC;)V");
|
||||
|
||||
m_ratingClass = jni::GetGlobalClassRef(env, "com/mapswithme/maps/ugc/UGC$Rating");
|
||||
m_ratingCtor = jni::GetConstructorID(env, m_ratingClass, "(Ljava/lang/String;F)V");
|
||||
|
|
|
@ -437,7 +437,9 @@ Framework::Framework(FrameworkParams const & params)
|
|||
InitCountryInfoGetter();
|
||||
LOG(LDEBUG, ("Country info getter initialized"));
|
||||
|
||||
// To avoid possible races - init search engine in constructor.
|
||||
InitUGC();
|
||||
LOG(LDEBUG, ("UGC initialized"));
|
||||
|
||||
InitSearchEngine();
|
||||
LOG(LDEBUG, ("Search engine initialized"));
|
||||
|
||||
|
@ -1457,7 +1459,6 @@ void Framework::InitCountryInfoGetter()
|
|||
void Framework::InitUGC()
|
||||
{
|
||||
ASSERT(!m_ugcApi.get(), ("InitUGC() must be called only once."));
|
||||
|
||||
m_ugcApi = make_unique<ugc::Api>(m_model.GetIndex());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue