From bb08c6bef4f7d0b42e2447a86eb093176baeb81e Mon Sep 17 00:00:00 2001 From: rachytski Date: Sun, 10 Jun 2012 16:58:35 +0400 Subject: [PATCH] changes according to code review. --- .../jni/com/mapswithme/maps/MWMActivity.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/android/jni/com/mapswithme/maps/MWMActivity.cpp b/android/jni/com/mapswithme/maps/MWMActivity.cpp index 70770ab11b..e81dd9487c 100644 --- a/android/jni/com/mapswithme/maps/MWMActivity.cpp +++ b/android/jni/com/mapswithme/maps/MWMActivity.cpp @@ -141,26 +141,29 @@ extern "C" LOG(LDEBUG, ("got response: ", url)); - if ((url.find("market://") == 0) || (url.find("http://") == 0)) + if ((url.find("https://") == 0) + || (url.find("market://") == 0) + || (url.find("http://") == 0)) { - LOG(LDEBUG, ("got PRO Version URL: ", url)); + LOG(LDEBUG, ("ProVersion URL is available: ", url)); Settings::Set(SETTINGS_PRO_VERSION_URL_KEY, url); JNIEnv * env = jni::GetEnv(); - jmethodID methodID = jni::GetJavaMethodID(jni::GetEnv(), *obj.get(), "onProVersionAvailable", "()V"); + jmethodID methodID = jni::GetJavaMethodID(env, *obj.get(), "onProVersionAvailable", "()V"); env->CallVoidMethod(*obj.get(), methodID); + + return; } else - { - uint64_t curTime = time(0); - Settings::Set(SETTINGS_PRO_VERSION_LAST_CHECK_TIME, strings::to_string(curTime)); LOG(LDEBUG, ("ProVersion is not available, checkTime=", curTime)); - } } else - LOG(LDEBUG, ("response finished with error")); + LOG(LDEBUG, ("ProVersion check response finished with error")); + + uint64_t curTime = time(0); + Settings::Set(SETTINGS_PRO_VERSION_LAST_CHECK_TIME, strings::to_string(curTime)); } JNIEXPORT void JNICALL