Minor changes.

This commit is contained in:
vng 2013-07-08 20:19:11 +03:00 committed by Alex Zolotarev
parent 50a723643a
commit 20667083b2
4 changed files with 7 additions and 10 deletions

View file

@ -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)

View file

@ -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)

View file

@ -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];

View file

@ -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();