From 20667083b2c58333a537bf9a0fd63c5ebe94f626 Mon Sep 17 00:00:00 2001 From: vng Date: Mon, 8 Jul 2013 20:19:11 +0300 Subject: [PATCH] Minor changes. --- android/src/com/mapswithme/util/Language.java | 3 +-- map/framework.cpp | 6 +++--- search/intermediate_result.cpp | 2 ++ search/result.cpp | 6 +----- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/android/src/com/mapswithme/util/Language.java b/android/src/com/mapswithme/util/Language.java index 85002a34eb..f8d223fd77 100644 --- a/android/src/com/mapswithme/util/Language.java +++ b/android/src/com/mapswithme/util/Language.java @@ -4,7 +4,6 @@ import java.util.Locale; import android.annotation.SuppressLint; import android.content.Context; -import android.os.Build; import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodSubtype; @@ -18,7 +17,7 @@ public class Language @SuppressLint("NewApi") static public String getKeyboardInput(Context context) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) + if (Utils.apiEqualOrGreaterThan(11)) { final InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); if (imm != null) diff --git a/map/framework.cpp b/map/framework.cpp index 1966e3bad2..30e3432934 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -518,7 +518,7 @@ string const GetFileName(string const & filePath) return ret; } -string const GenerateValidAndUniqueFilePathForKLM(string const & fileName) +string const GenerateValidAndUniqueFilePathForKML(string const & fileName) { string filePath = BookmarkCategory::RemoveInvalidSymbols(fileName); filePath = BookmarkCategory::GenerateUniqueFileName(GetPlatform().WritableDir(), filePath); @@ -533,7 +533,7 @@ bool Framework::AddBookmarksFile(string const & filePath) string fileSavePath; if (fileExt == BOOKMARKS_FILE_EXTENSION) { - fileSavePath = GenerateValidAndUniqueFilePathForKLM(GetFileName(filePath)); + fileSavePath = GenerateValidAndUniqueFilePathForKML(GetFileName(filePath)); if (!my::CopyFileX(filePath, fileSavePath)) return false; } @@ -555,7 +555,7 @@ bool Framework::AddBookmarksFile(string const & filePath) if (kmlFileName.empty()) return false; - fileSavePath = GenerateValidAndUniqueFilePathForKLM(kmlFileName); + fileSavePath = GenerateValidAndUniqueFilePathForKML(kmlFileName); ZipFileReader::UnzipFile(filePath, kmlFileName, fileSavePath); } catch (RootException const & e) diff --git a/search/intermediate_result.cpp b/search/intermediate_result.cpp index 0cc07ebccb..4d032e05cb 100644 --- a/search/intermediate_result.cpp +++ b/search/intermediate_result.cpp @@ -290,6 +290,8 @@ bool PreResult2::StrictEqualF::operator() (PreResult2 const & r) const namespace { + /// @todo Using the criteria that may be inappropriate in some cases + /// ("highway" may be point and area objects - "bus_stop"). class IsLinearChecker { uint8_t m_index[2]; diff --git a/search/result.cpp b/search/result.cpp index 7aedb5eb0c..c0f49a8ae0 100644 --- a/search/result.cpp +++ b/search/result.cpp @@ -77,14 +77,10 @@ void AddressInfo::MakeFrom(Result const & res) { ASSERT_EQUAL ( res.GetResultType(), Result::RESULT_FEATURE, () ); - // push the feature type + // push the feature type (may be empty for coordinates result) string const type = res.GetFeatureType(); if (!type.empty()) m_types.push_back(type); - else - { - ASSERT ( false, ("Search result with empty type") ); - } // assign name if it's not equal with type string name = res.GetString();