diff --git a/android/jni/com/mapswithme/maps/DownloadResourcesActivity.cpp b/android/jni/com/mapswithme/maps/DownloadResourcesActivity.cpp index 581cef4d11..2fcd36f5db 100644 --- a/android/jni/com/mapswithme/maps/DownloadResourcesActivity.cpp +++ b/android/jni/com/mapswithme/maps/DownloadResourcesActivity.cpp @@ -142,18 +142,6 @@ extern "C" return res; } - JNIEXPORT jboolean JNICALL - Java_com_mapswithme_maps_DownloadResourcesActivity_isWorldExists( - JNIEnv * env, jobject thiz, jstring sdcardPath) - { - string const path = jni::ToNativeString(env, sdcardPath); - - Platform & pl = GetPlatform(); - uint64_t dummy; - return (pl.GetFileSizeByName(path + WORLD_FILE_NAME + DATA_FILE_EXTENSION, dummy) && - pl.GetFileSizeByName(path + WORLD_COASTS_FILE_NAME + DATA_FILE_EXTENSION, dummy)); - } - void DownloadFileFinished(shared_ptr obj, HttpRequest const & req) { HttpRequest::StatusT const status = req.Status(); diff --git a/android/jni/com/mapswithme/maps/Framework.cpp b/android/jni/com/mapswithme/maps/Framework.cpp index 64395986b0..4a0d549f0d 100644 --- a/android/jni/com/mapswithme/maps/Framework.cpp +++ b/android/jni/com/mapswithme/maps/Framework.cpp @@ -727,17 +727,6 @@ extern "C" return jni::ToJavaString(env, info.FormatNameAndAddress()); } - JNIEXPORT jstring JNICALL - Java_com_mapswithme_maps_Framework_getPoiTypeNameForLatLon(JNIEnv * env, jclass clazz, jdouble lat, jdouble lon) - { - search::AddressInfo info; - - g_framework->NativeFramework()->GetAddressInfoForGlobalPoint( - m2::PointD(MercatorBounds::LonToX(lon), MercatorBounds::LatToY(lat)), info); - - return jni::ToJavaString(env, info.GetPinType()); - } - JNIEXPORT void JNICALL Java_com_mapswithme_maps_Framework_nativeClearApiPoints(JNIEnv * env, jclass clazz) { diff --git a/android/jni/com/mapswithme/maps/MapStorage.cpp b/android/jni/com/mapswithme/maps/MapStorage.cpp index ad30b51cf4..a96c4aa89f 100644 --- a/android/jni/com/mapswithme/maps/MapStorage.cpp +++ b/android/jni/com/mapswithme/maps/MapStorage.cpp @@ -46,15 +46,6 @@ extern "C" } }; - JNIEXPORT jstring JNICALL - Java_com_mapswithme_maps_MapStorage_countryFileNameByIndex(JNIEnv * env, jobject thiz, jobject idx) - { - return jni::ToJavaString(env, g_framework->Storage() - .CountryByIndex(IndexBinding(idx).toNative()) - .GetFile() - .GetFileWithoutExt()); - } - JNIEXPORT jint JNICALL Java_com_mapswithme_maps_MapStorage_countriesCount(JNIEnv * env, jobject thiz, jobject idx) { diff --git a/android/src/com/mapswithme/maps/DownloadResourcesActivity.java b/android/src/com/mapswithme/maps/DownloadResourcesActivity.java index 23557dda4a..a1391a7e5a 100644 --- a/android/src/com/mapswithme/maps/DownloadResourcesActivity.java +++ b/android/src/com/mapswithme/maps/DownloadResourcesActivity.java @@ -774,7 +774,6 @@ public class DownloadResourcesActivity extends MapsWithMeBaseActivity } private native int getBytesToDownload(); - private native boolean isWorldExists(String path); private native int startNextFileDownload(Object observer); private native Index findIndexByPos(double lat, double lon); private native void cancelCurrentFile(); diff --git a/android/src/com/mapswithme/maps/Framework.java b/android/src/com/mapswithme/maps/Framework.java index a1a0b460b9..647c25eee5 100644 --- a/android/src/com/mapswithme/maps/Framework.java +++ b/android/src/com/mapswithme/maps/Framework.java @@ -169,7 +169,6 @@ public class Framework public native static void injectData(SearchResult searchResult, long index); public native static void cleanSearchLayerOnMap(); public native static void invalidate(); - public native static String getPoiTypeNameForLatLon(double lat, double lon); private native static String[] nativeGetMovablefilesExt(); private native static String nativeGetBookmarksExt(); diff --git a/android/src/com/mapswithme/maps/MWMActivity.java b/android/src/com/mapswithme/maps/MWMActivity.java index 781204edb8..9d37a4dcdb 100644 --- a/android/src/com/mapswithme/maps/MWMActivity.java +++ b/android/src/com/mapswithme/maps/MWMActivity.java @@ -91,8 +91,6 @@ public class MWMActivity extends NvEventQueueActivity // Info box (place page). private MapInfoView mInfoView; - private boolean mIsInfoBoxVisible; - // Drawer components private DrawerLayout mDrawerLayout; @@ -507,7 +505,6 @@ public class MWMActivity extends NvEventQueueActivity mProDialogMessage = message; runOnUiThread(new Runnable() { - @SuppressWarnings("deprecation") @Override public void run() diff --git a/android/src/com/mapswithme/maps/MWMApplication.java b/android/src/com/mapswithme/maps/MWMApplication.java index fdeb1d01ef..c3b72181a8 100644 --- a/android/src/com/mapswithme/maps/MWMApplication.java +++ b/android/src/com/mapswithme/maps/MWMApplication.java @@ -1,20 +1,14 @@ package com.mapswithme.maps; -import java.io.BufferedReader; import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; import android.app.Activity; import android.content.pm.PackageManager.NameNotFoundException; -import android.content.res.AssetManager; import android.os.Build; import android.os.Environment; import android.util.Log; import android.widget.Toast; -import com.mapswithme.maps.BuildConfig; import com.mapswithme.maps.MapStorage.Index; import com.mapswithme.maps.background.Notifier; import com.mapswithme.maps.bookmarks.data.BookmarkManager; @@ -38,7 +32,6 @@ public class MWMApplication extends android.app.Application implements MapStorag private LocationService m_location = null; private LocationState m_locationState = null; private MapStorage m_storage = null; - private int m_slotID = 0; private boolean m_isPro = false; private boolean m_isYota = false; @@ -137,7 +130,7 @@ public class MWMApplication extends android.app.Application implements MapStorag nativeInit(getApkPath(), extStoragePath, extTmpPath, getOBBGooglePath(), m_isPro, m_isYota); - m_slotID = getMapStorage().subscribe(this); + getMapStorage().subscribe(this); // init cross-platform strings bundle nativeAddLocalization("country_status_added_to_queue", getString(R.string.country_status_added_to_queue)); @@ -304,10 +297,7 @@ public class MWMApplication extends android.app.Application implements MapStorag final long DELTA = 60*1000; final File mwmDir = new File(getDataStoragePath()); - - final boolean isNewUser = mwmDir.exists() - ? (System.currentTimeMillis() - mwmDir.lastModified()) < DELTA - : true; + final boolean isNewUser = !mwmDir.exists() || (System.currentTimeMillis() - mwmDir.lastModified() >= DELTA); final String advId = getString(R.string.advertiser_id); final String convKey = getString(R.string.conversion_key); diff --git a/android/src/com/mapswithme/maps/MapStorage.java b/android/src/com/mapswithme/maps/MapStorage.java index 2b047d1a38..7baf6dd92b 100644 --- a/android/src/com/mapswithme/maps/MapStorage.java +++ b/android/src/com/mapswithme/maps/MapStorage.java @@ -133,7 +133,6 @@ public class MapStorage } } - public native String countryFileNameByIndex(Index idx); public native int countriesCount(Index idx); public native int countryStatus(Index idx); public native long countryLocalSizeInBytes(Index idx); diff --git a/search/search_query.cpp b/search/search_query.cpp index 3b41022450..89bedbc36a 100644 --- a/search/search_query.cpp +++ b/search/search_query.cpp @@ -280,9 +280,8 @@ void Query::SetQuery(string const & query) SplitUniString(NormalizeAndSimplifyString(query), MakeBackInsertFunctor(m_tokens), delims); #ifdef HOUSE_SEARCH_TEST - int tokenIndex = m_tokens.size() - 1; - - while(tokenIndex >= 0) + int tokenIndex = static_cast(m_tokens.size()) - 1; + while (tokenIndex >= 0) { if (feature::IsHouseNumberDeepCheck(m_tokens[tokenIndex])) {