[android] Removed unused code.

This commit is contained in:
vng 2014-05-12 20:02:45 +03:00 committed by Alex Zolotarev
parent 5a92aef1fa
commit 689f5e83c9
9 changed files with 4 additions and 53 deletions

View file

@ -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<jobject> obj, HttpRequest const & req)
{
HttpRequest::StatusT const status = req.Status();

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -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<int>(m_tokens.size()) - 1;
while (tokenIndex >= 0)
{
if (feature::IsHouseNumberDeepCheck(m_tokens[tokenIndex]))
{