Package/class renaming
This commit is contained in:
parent
58500cd3f3
commit
64a3356845
35 changed files with 106 additions and 112 deletions
|
@ -7,7 +7,6 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.osmand.Algoritms;
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.ResultMatcher;
|
||||
import net.osmand.binary.BinaryMapIndexReader;
|
||||
|
@ -18,6 +17,7 @@ import net.osmand.data.Amenity;
|
|||
import net.osmand.data.AmenityType;
|
||||
import net.osmand.osm.LatLon;
|
||||
import net.osmand.osm.MapUtils;
|
||||
import net.osmand.util.Algorithms;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
|
@ -137,8 +137,8 @@ public class AmenityIndexRepositoryBinary implements AmenityIndexRepository {
|
|||
int zoom, String filterId, List<Amenity> toFill, boolean fillFound){
|
||||
boolean inside = cTopLatitude >= topLatitude && cLeftLongitude <= leftLongitude && cRightLongitude >= rightLongitude
|
||||
&& cBottomLatitude <= bottomLatitude && zoom == cZoom;
|
||||
boolean noNeedToSearch = inside && Algoritms.objectEquals(filterId, cFilterId);
|
||||
if((inside || fillFound) && toFill != null && Algoritms.objectEquals(filterId, cFilterId)){
|
||||
boolean noNeedToSearch = inside && Algorithms.objectEquals(filterId, cFilterId);
|
||||
if((inside || fillFound) && toFill != null && Algorithms.objectEquals(filterId, cFilterId)){
|
||||
for(Amenity a : cachedObjects){
|
||||
LatLon location = a.getLocation();
|
||||
if (location.getLatitude() <= topLatitude && location.getLongitude() >= leftLongitude && location.getLongitude() <= rightLongitude
|
||||
|
|
|
@ -11,7 +11,6 @@ import java.util.LinkedHashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.osmand.Algoritms;
|
||||
import net.osmand.IProgress;
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.ResultMatcher;
|
||||
|
@ -25,6 +24,7 @@ import net.osmand.osm.MapUtils;
|
|||
import net.osmand.osm.Node;
|
||||
import net.osmand.osm.io.IOsmStorageFilter;
|
||||
import net.osmand.osm.io.OsmBaseStorage;
|
||||
import net.osmand.util.Algorithms;
|
||||
import net.sf.junidecode.Junidecode;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
@ -136,8 +136,8 @@ public class AmenityIndexRepositoryOdb extends BaseLocationIndexRepository<Ameni
|
|||
}
|
||||
boolean inside = cTopLatitude >= topLatitude && cLeftLongitude <= leftLongitude && cRightLongitude >= rightLongitude
|
||||
&& cBottomLatitude <= bottomLatitude && zoom == cZoom;
|
||||
boolean noNeedToSearch = inside && Algoritms.objectEquals(filterId, cFilterId);
|
||||
if((inside || fillFound) && toFill != null && Algoritms.objectEquals(filterId, cFilterId)){
|
||||
boolean noNeedToSearch = inside && Algorithms.objectEquals(filterId, cFilterId);
|
||||
if((inside || fillFound) && toFill != null && Algorithms.objectEquals(filterId, cFilterId)){
|
||||
for(Amenity a : cachedObjects){
|
||||
LatLon location = a.getLocation();
|
||||
if (location.getLatitude() <= topLatitude && location.getLongitude() >= leftLongitude && location.getLongitude() <= rightLongitude
|
||||
|
|
|
@ -6,7 +6,6 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.Stack;
|
||||
|
||||
import net.osmand.Algoritms;
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.ResultMatcher;
|
||||
import net.osmand.data.Amenity;
|
||||
|
@ -14,6 +13,7 @@ import net.osmand.data.TransportStop;
|
|||
import net.osmand.map.ITileSource;
|
||||
import net.osmand.map.MapTileDownloader.DownloadRequest;
|
||||
import net.osmand.map.MapTileDownloader.IMapDownloaderCallback;
|
||||
import net.osmand.util.Algorithms;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
|
@ -295,7 +295,7 @@ public class AsyncLoadingThread extends Thread {
|
|||
return false;
|
||||
}
|
||||
public boolean recalculateRequest(AmenityLoadRequest req) {
|
||||
if (this.zoom != req.zoom || !Algoritms.objectEquals(this.filter, req.filter) || req.repoHasChange()) {
|
||||
if (this.zoom != req.zoom || !Algorithms.objectEquals(this.filter, req.filter) || req.repoHasChange()) {
|
||||
return true;
|
||||
}
|
||||
return !isContains(req.topLatitude, req.leftLongitude, req.bottomLatitude, req.rightLongitude);
|
||||
|
|
|
@ -11,7 +11,6 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import net.osmand.Algoritms;
|
||||
import net.osmand.FavouritePoint;
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.access.AccessibleToast;
|
||||
|
@ -36,6 +35,7 @@ import net.osmand.plus.voice.CommandPlayer;
|
|||
import net.osmand.plus.voice.CommandPlayerException;
|
||||
import net.osmand.plus.voice.CommandPlayerFactory;
|
||||
import net.osmand.render.RenderingRulesStorage;
|
||||
import net.osmand.util.Algorithms;
|
||||
import android.app.Activity;
|
||||
import android.app.AlarmManager;
|
||||
import android.app.AlertDialog;
|
||||
|
@ -328,7 +328,7 @@ public class OsmandApplication extends Application implements ClientContext {
|
|||
}
|
||||
|
||||
} else {
|
||||
if (player == null || !Algoritms.objectEquals(voiceProvider, player.getCurrentVoice())) {
|
||||
if (player == null || !Algorithms.objectEquals(voiceProvider, player.getCurrentVoice())) {
|
||||
initVoiceDataInDifferentThread(uiContext, voiceProvider, run);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,8 +9,8 @@ import net.osmand.IProgress;
|
|||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.access.AccessibilityPlugin;
|
||||
import net.osmand.plus.activities.LocalIndexInfo;
|
||||
import net.osmand.plus.activities.LocalIndexesActivity.LoadLocalIndexTask;
|
||||
import net.osmand.plus.activities.LocalIndexesActivity;
|
||||
import net.osmand.plus.activities.LocalIndexesActivity.LoadLocalIndexTask;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.activities.SettingsActivity;
|
||||
import net.osmand.plus.audionotes.AudioVideoNotesPlugin;
|
||||
|
|
|
@ -133,7 +133,7 @@ public class RegionAddressRepositoryBinary implements RegionAddressRepository {
|
|||
}
|
||||
try {
|
||||
// essentially index is created that cities towns are first in cities map
|
||||
if (/*name.length() >= 2 && Algoritms.containsDigit(name) && */searchVillages) {
|
||||
if (/*name.length() >= 2 && Algorithms.containsDigit(name) && */searchVillages) {
|
||||
// also try to identify postcodes
|
||||
String uName = name.toUpperCase();
|
||||
List<City> foundCities = file.getCities(region, BinaryMapIndexReader.buildAddressRequest(resultMatcher),
|
||||
|
|
|
@ -19,7 +19,6 @@ import java.util.Map;
|
|||
import java.util.Set;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import net.osmand.Algoritms;
|
||||
import net.osmand.GeoidAltitudeCorrection;
|
||||
import net.osmand.IProgress;
|
||||
import net.osmand.PlatformUtil;
|
||||
|
@ -44,6 +43,7 @@ import net.osmand.plus.render.NativeOsmandLibrary;
|
|||
import net.osmand.plus.srtmplugin.SRTMPlugin;
|
||||
import net.osmand.plus.views.OsmandMapLayer.DrawSettings;
|
||||
import net.osmand.render.RenderingRulesStorage;
|
||||
import net.osmand.util.Algorithms;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
@ -495,14 +495,14 @@ public class ResourceManager {
|
|||
//TODO consider some other place for this method?
|
||||
public static void copyAssets(AssetManager assetManager, String assetName, File file) throws IOException {
|
||||
if(file.exists()){
|
||||
Algoritms.removeAllFiles(file);
|
||||
Algorithms.removeAllFiles(file);
|
||||
}
|
||||
file.getParentFile().mkdirs();
|
||||
InputStream is = assetManager.open(assetName, AssetManager.ACCESS_STREAMING);
|
||||
FileOutputStream out = new FileOutputStream(file);
|
||||
Algoritms.streamCopy(is, out);
|
||||
Algoritms.closeStream(out);
|
||||
Algoritms.closeStream(is);
|
||||
Algorithms.streamCopy(is, out);
|
||||
Algorithms.closeStream(out);
|
||||
Algorithms.closeStream(is);
|
||||
}
|
||||
|
||||
private void initRenderers(IProgress progress) {
|
||||
|
|
|
@ -7,13 +7,13 @@ import java.nio.ByteBuffer;
|
|||
import java.text.MessageFormat;
|
||||
import java.util.List;
|
||||
|
||||
import net.osmand.Algoritms;
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.data.IndexConstants;
|
||||
import net.osmand.map.ITileSource;
|
||||
import net.osmand.map.TileSourceManager.TileSourceTemplate;
|
||||
import net.osmand.plus.api.SQLiteAPI.SQLiteConnection;
|
||||
import net.osmand.plus.api.SQLiteAPI.SQLiteCursor;
|
||||
import net.osmand.util.Algorithms;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
|
@ -145,7 +145,7 @@ public class SQLiteTileSource implements ITileSource {
|
|||
db = ctx.getSQLiteAPI().openByAbsolutePath(file.getAbsolutePath(), false);
|
||||
try {
|
||||
String template = db.compileStatement("SELECT url FROM info").simpleQueryForString(); //$NON-NLS-1$
|
||||
if(!Algoritms.isEmpty(template)){
|
||||
if(!Algorithms.isEmpty(template)){
|
||||
urlTemplate = template;
|
||||
}
|
||||
} catch (RuntimeException e) {
|
||||
|
|
|
@ -6,9 +6,9 @@ import java.util.List;
|
|||
import java.util.TimeZone;
|
||||
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.SunriseSunset;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.OsmandSettings.DayNightMode;
|
||||
import net.osmand.util.SunriseSunset;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import net.osmand.Algoritms;
|
||||
import net.osmand.IProgress;
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.access.AccessibleToast;
|
||||
|
@ -41,6 +40,7 @@ import net.osmand.plus.download.IndexItem;
|
|||
import net.osmand.plus.download.IndexItemCategory;
|
||||
import net.osmand.plus.download.SrtmIndexItem;
|
||||
import net.osmand.plus.srtmplugin.SRTMPlugin;
|
||||
import net.osmand.util.Algorithms;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.app.Dialog;
|
||||
|
@ -700,7 +700,7 @@ public class DownloadIndexActivity extends OsmandExpandableListActivity {
|
|||
downloads.set(downloads.get() + 1);
|
||||
}
|
||||
if (entry.existingBackupFile != null) {
|
||||
Algoritms.removeAllFiles(entry.existingBackupFile);
|
||||
Algorithms.removeAllFiles(entry.existingBackupFile);
|
||||
}
|
||||
trackEvent(entry);
|
||||
publishProgress(entry);
|
||||
|
|
|
@ -10,7 +10,6 @@ import java.util.Locale;
|
|||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import net.osmand.Algoritms;
|
||||
import net.osmand.IProgress;
|
||||
import net.osmand.access.AccessibleToast;
|
||||
import net.osmand.data.IndexConstants;
|
||||
|
@ -22,6 +21,7 @@ import net.osmand.plus.OsmandSettings;
|
|||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.EnumAdapter.IEnumWithResource;
|
||||
import net.osmand.plus.activities.LocalIndexHelper.LocalIndexType;
|
||||
import net.osmand.util.Algorithms;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
|
@ -353,7 +353,7 @@ public class LocalIndexesActivity extends OsmandExpandableListActivity {
|
|||
boolean successfull = false;
|
||||
if(operation == DELETE_OPERATION){
|
||||
File f = new File(info.getPathToData());
|
||||
successfull = Algoritms.removeAllFiles(f);
|
||||
successfull = Algorithms.removeAllFiles(f);
|
||||
} else if(operation == RESTORE_OPERATION){
|
||||
successfull = move(new File(info.getPathToData()), getFileToRestore(info));
|
||||
if(successfull){
|
||||
|
|
|
@ -7,7 +7,6 @@ import java.util.LinkedHashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.osmand.Algoritms;
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.access.AccessibilityPlugin;
|
||||
import net.osmand.access.AccessibleActivity;
|
||||
|
@ -44,6 +43,7 @@ import net.osmand.plus.views.AnimateDraggingMapThread;
|
|||
import net.osmand.plus.views.OsmandMapLayer;
|
||||
import net.osmand.plus.views.OsmandMapTileView;
|
||||
import net.osmand.plus.views.PointLocationLayer;
|
||||
import net.osmand.util.Algorithms;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.app.Dialog;
|
||||
|
@ -343,8 +343,8 @@ public class MapActivity extends AccessibleActivity implements IMapLocationListe
|
|||
// if destination point was changed try to recalculate route
|
||||
TargetPointsHelper targets = getTargetPoints();
|
||||
if (routingHelper.isFollowingMode() && (
|
||||
!Algoritms.objectEquals(targets.getPointToNavigate(), routingHelper.getFinalLocation() )||
|
||||
!Algoritms.objectEquals(targets.getIntermediatePoints(), routingHelper.getIntermediatePoints())
|
||||
!Algorithms.objectEquals(targets.getPointToNavigate(), routingHelper.getFinalLocation() )||
|
||||
!Algorithms.objectEquals(targets.getIntermediatePoints(), routingHelper.getIntermediatePoints())
|
||||
)) {
|
||||
routingHelper.setFinalAndCurrentLocation(targets.getPointToNavigate(),
|
||||
targets.getIntermediatePoints(),
|
||||
|
|
|
@ -6,7 +6,6 @@ import java.util.Arrays;
|
|||
import java.util.Formatter;
|
||||
import java.util.Locale;
|
||||
|
||||
import net.osmand.Algoritms;
|
||||
import net.osmand.FavouritePoint;
|
||||
import net.osmand.osm.LatLon;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
|
@ -14,6 +13,7 @@ import net.osmand.plus.OsmandSettings;
|
|||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.FavouritesListActivity;
|
||||
import net.osmand.plus.activities.NavigatePointActivity;
|
||||
import net.osmand.util.Algorithms;
|
||||
import android.app.Activity;
|
||||
import android.app.TabActivity;
|
||||
import android.content.Intent;
|
||||
|
@ -286,7 +286,7 @@ public class SearchActivity extends TabActivity {
|
|||
double lon = intent.getDoubleExtra(SEARCH_LON, 0);
|
||||
if (lat != 0 || lon != 0) {
|
||||
LatLon l = new LatLon(lat, lon);
|
||||
if(!Algoritms.objectEquals(reqSearchPoint, l)){
|
||||
if(!Algorithms.objectEquals(reqSearchPoint, l)){
|
||||
reqSearchPoint = l;
|
||||
updateSearchPoint(reqSearchPoint, getString(R.string.search_position_fixed), true);
|
||||
}
|
||||
|
@ -295,7 +295,7 @@ public class SearchActivity extends TabActivity {
|
|||
|
||||
if(searchPoint == null){
|
||||
LatLon last = settings.getLastKnownMapLocation();
|
||||
if(!Algoritms.objectEquals(reqSearchPoint, last)){
|
||||
if(!Algorithms.objectEquals(reqSearchPoint, last)){
|
||||
reqSearchPoint = last;
|
||||
updateSearchPoint(last, getString(R.string.search_position_fixed), true);
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ package net.osmand.plus.activities.search;
|
|||
|
||||
import java.text.MessageFormat;
|
||||
|
||||
import net.osmand.Algoritms;
|
||||
import net.osmand.osm.LatLon;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.OsmandSettings;
|
||||
|
@ -11,6 +10,7 @@ import net.osmand.plus.R;
|
|||
import net.osmand.plus.RegionAddressRepository;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.activities.MapActivityActions;
|
||||
import net.osmand.util.Algorithms;
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
@ -205,24 +205,24 @@ public class SearchAddressActivity extends Activity {
|
|||
String historyName = null;
|
||||
String objectName = "";
|
||||
int zoom = 12;
|
||||
if (!Algoritms.isEmpty(street2) && !Algoritms.isEmpty(street)) {
|
||||
String cityName = !Algoritms.isEmpty(postcode) ? postcode : city;
|
||||
if (!Algorithms.isEmpty(street2) && !Algorithms.isEmpty(street)) {
|
||||
String cityName = !Algorithms.isEmpty(postcode) ? postcode : city;
|
||||
objectName = street;
|
||||
historyName = MessageFormat.format(getString(R.string.search_history_int_streets), street, street2,
|
||||
cityName);
|
||||
zoom = 16;
|
||||
} else if (!Algoritms.isEmpty(building)) {
|
||||
String cityName = !Algoritms.isEmpty(postcode) ? postcode : city;
|
||||
} else if (!Algorithms.isEmpty(building)) {
|
||||
String cityName = !Algorithms.isEmpty(postcode) ? postcode : city;
|
||||
objectName = street + " " + building;
|
||||
historyName = MessageFormat.format(getString(R.string.search_history_building), building, street,
|
||||
cityName);
|
||||
zoom = 16;
|
||||
} else if (!Algoritms.isEmpty(street)) {
|
||||
} else if (!Algorithms.isEmpty(street)) {
|
||||
String cityName = postcode != null ? postcode : city;
|
||||
objectName = street;
|
||||
historyName = MessageFormat.format(getString(R.string.search_history_street), street, cityName);
|
||||
zoom = 15;
|
||||
} else if (!Algoritms.isEmpty(city)) {
|
||||
} else if (!Algorithms.isEmpty(city)) {
|
||||
historyName = MessageFormat.format(getString(R.string.search_history_city), city);
|
||||
objectName = city;
|
||||
zoom = 13;
|
||||
|
@ -250,20 +250,20 @@ public class SearchAddressActivity extends Activity {
|
|||
protected void updateBuildingSection(){
|
||||
if(radioBuilding){
|
||||
((TextView)findViewById(R.id.BuildingText)).setText(R.string.search_address_building);
|
||||
if(Algoritms.isEmpty(building)){
|
||||
if(Algorithms.isEmpty(building)){
|
||||
((TextView)findViewById(R.id.BuildingButton)).setText(R.string.choose_building);
|
||||
} else {
|
||||
((TextView)findViewById(R.id.BuildingButton)).setText(building);
|
||||
}
|
||||
} else {
|
||||
((TextView)findViewById(R.id.BuildingText)).setText(R.string.search_address_street);
|
||||
if(Algoritms.isEmpty(street2)){
|
||||
if(Algorithms.isEmpty(street2)){
|
||||
((TextView)findViewById(R.id.BuildingButton)).setText(R.string.choose_intersected_street);
|
||||
} else {
|
||||
((TextView)findViewById(R.id.BuildingButton)).setText(street2);
|
||||
}
|
||||
}
|
||||
findViewById(R.id.ResetBuilding).setEnabled(!Algoritms.isEmpty(street2) || !Algoritms.isEmpty(building));
|
||||
findViewById(R.id.ResetBuilding).setEnabled(!Algorithms.isEmpty(street2) || !Algorithms.isEmpty(building));
|
||||
}
|
||||
|
||||
protected void updateUI(){
|
||||
|
@ -278,34 +278,34 @@ public class SearchAddressActivity extends Activity {
|
|||
findViewById(R.id.SearchOnline).setVisibility(View.VISIBLE);
|
||||
showOnMap.setVisibility(View.VISIBLE);
|
||||
}
|
||||
findViewById(R.id.ResetCountry).setEnabled(!Algoritms.isEmpty(region));
|
||||
if(Algoritms.isEmpty(region)){
|
||||
findViewById(R.id.ResetCountry).setEnabled(!Algorithms.isEmpty(region));
|
||||
if(Algorithms.isEmpty(region)){
|
||||
countryButton.setText(R.string.ChooseCountry);
|
||||
} else {
|
||||
countryButton.setText(region);
|
||||
}
|
||||
findViewById(R.id.ResetCity).setEnabled(!Algoritms.isEmpty(city) || !Algoritms.isEmpty(postcode));
|
||||
if(Algoritms.isEmpty(city) && Algoritms.isEmpty(postcode)){
|
||||
findViewById(R.id.ResetCity).setEnabled(!Algorithms.isEmpty(city) || !Algorithms.isEmpty(postcode));
|
||||
if(Algorithms.isEmpty(city) && Algorithms.isEmpty(postcode)){
|
||||
cityButton.setText(R.string.choose_city);
|
||||
} else {
|
||||
if(!Algoritms.isEmpty(postcode)){
|
||||
if(!Algorithms.isEmpty(postcode)){
|
||||
cityButton.setText(postcode);
|
||||
} else {
|
||||
cityButton.setText(city);
|
||||
}
|
||||
}
|
||||
cityButton.setEnabled(!Algoritms.isEmpty(region));
|
||||
cityButton.setEnabled(!Algorithms.isEmpty(region));
|
||||
|
||||
findViewById(R.id.ResetStreet).setEnabled(!Algoritms.isEmpty(street));
|
||||
if(Algoritms.isEmpty(street)){
|
||||
findViewById(R.id.ResetStreet).setEnabled(!Algorithms.isEmpty(street));
|
||||
if(Algorithms.isEmpty(street)){
|
||||
streetButton.setText(R.string.choose_street);
|
||||
} else {
|
||||
streetButton.setText(street);
|
||||
}
|
||||
streetButton.setEnabled(!Algoritms.isEmpty(city) || !Algoritms.isEmpty(postcode));
|
||||
streetButton.setEnabled(!Algorithms.isEmpty(city) || !Algorithms.isEmpty(postcode));
|
||||
|
||||
buildingButton.setEnabled(!Algoritms.isEmpty(street));
|
||||
((RadioGroup)findViewById(R.id.RadioGroup)).setVisibility(Algoritms.isEmpty(street) ? View.GONE : View.VISIBLE);
|
||||
buildingButton.setEnabled(!Algorithms.isEmpty(street));
|
||||
((RadioGroup)findViewById(R.id.RadioGroup)).setVisibility(Algorithms.isEmpty(street) ? View.GONE : View.VISIBLE);
|
||||
|
||||
if(radioBuilding){
|
||||
((RadioButton)findViewById(R.id.RadioBuilding)).setChecked(true);
|
||||
|
@ -317,19 +317,19 @@ public class SearchAddressActivity extends Activity {
|
|||
}
|
||||
|
||||
public void loadData() {
|
||||
if (!Algoritms.isEmpty(region)) {
|
||||
if (!Algorithms.isEmpty(region)) {
|
||||
String postcodeStr = osmandSettings.getLastSearchedPostcode();
|
||||
if (!Algoritms.isEmpty(postcodeStr)) {
|
||||
if (!Algorithms.isEmpty(postcodeStr)) {
|
||||
postcode = postcodeStr;
|
||||
} else {
|
||||
city = osmandSettings.getLastSearchedCityName();
|
||||
}
|
||||
|
||||
if (!Algoritms.isEmpty(postcode) || !Algoritms.isEmpty(city)) {
|
||||
if (!Algorithms.isEmpty(postcode) || !Algorithms.isEmpty(city)) {
|
||||
street = osmandSettings.getLastSearchedStreet();
|
||||
if (!Algoritms.isEmpty(street)) {
|
||||
if (!Algorithms.isEmpty(street)) {
|
||||
String str = osmandSettings.getLastSearchedIntersectedStreet();
|
||||
radioBuilding = Algoritms.isEmpty(str);
|
||||
radioBuilding = Algorithms.isEmpty(str);
|
||||
if (!radioBuilding) {
|
||||
street2 = str;
|
||||
} else {
|
||||
|
|
|
@ -9,7 +9,6 @@ import java.util.List;
|
|||
import java.util.Locale;
|
||||
|
||||
import net.londatiga.android.QuickAction;
|
||||
import net.osmand.Algoritms;
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.access.AccessibleToast;
|
||||
import net.osmand.osm.LatLon;
|
||||
|
@ -22,6 +21,7 @@ import net.osmand.plus.Version;
|
|||
import net.osmand.plus.activities.MapActivityActions;
|
||||
import net.osmand.plus.activities.OsmandListActivity;
|
||||
import net.osmand.plus.activities.search.SearchActivity.SearchActivityChild;
|
||||
import net.osmand.util.Algorithms;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
@ -125,7 +125,7 @@ public class SearchAddressOnlineActivity extends OsmandListActivity implements S
|
|||
}
|
||||
|
||||
protected void searchPlaces(final String search) {
|
||||
if(Algoritms.isEmpty(search)){
|
||||
if(Algorithms.isEmpty(search)){
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ package net.osmand.plus.activities.search;
|
|||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
import net.osmand.Algoritms;
|
||||
import net.osmand.ResultMatcher;
|
||||
import net.osmand.data.Building;
|
||||
import net.osmand.data.City;
|
||||
|
@ -12,6 +11,7 @@ import net.osmand.osm.LatLon;
|
|||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.RegionAddressRepository;
|
||||
import net.osmand.util.Algorithms;
|
||||
import android.os.AsyncTask;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
@ -26,8 +26,8 @@ public class SearchBuildingByNameActivity extends SearchByNameAbstractActivity<B
|
|||
return new Comparator<Building>() {
|
||||
@Override
|
||||
public int compare(Building o1, Building o2) {
|
||||
int i1 = Algoritms.extractFirstIntegerNumber(o1.getName());
|
||||
int i2 = Algoritms.extractFirstIntegerNumber(o2.getName());
|
||||
int i1 = Algorithms.extractFirstIntegerNumber(o1.getName());
|
||||
int i2 = Algorithms.extractFirstIntegerNumber(o2.getName());
|
||||
return i1 - i2;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -17,7 +17,6 @@ import java.util.Map.Entry;
|
|||
|
||||
import net.londatiga.android.ActionItem;
|
||||
import net.londatiga.android.QuickAction;
|
||||
import net.osmand.Algoritms;
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.ResultMatcher;
|
||||
import net.osmand.access.AccessibleToast;
|
||||
|
@ -39,6 +38,7 @@ import net.osmand.plus.activities.EditPOIFilterActivity;
|
|||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.activities.MapActivityActions;
|
||||
import net.osmand.plus.activities.OsmandListActivity;
|
||||
import net.osmand.util.Algorithms;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.Context;
|
||||
|
@ -156,12 +156,12 @@ public class SearchPOIActivity extends OsmandListActivity implements SensorEvent
|
|||
return;
|
||||
}
|
||||
if(isNameFinderFilter() &&
|
||||
!Algoritms.objectEquals(((NameFinderPoiFilter) filter).getQuery(), query)){
|
||||
!Algorithms.objectEquals(((NameFinderPoiFilter) filter).getQuery(), query)){
|
||||
filter.clearPreviousZoom();
|
||||
((NameFinderPoiFilter) filter).setQuery(query);
|
||||
runNewSearchQuery(SearchAmenityRequest.buildRequest(location, SearchAmenityRequest.NEW_SEARCH_INIT));
|
||||
} else if(isSearchByNameFilter() &&
|
||||
!Algoritms.objectEquals(((SearchByNameFilter) filter).getQuery(), query)){
|
||||
!Algorithms.objectEquals(((SearchByNameFilter) filter).getQuery(), query)){
|
||||
showFilter.setVisibility(View.INVISIBLE);
|
||||
filter.clearPreviousZoom();
|
||||
showPoiCategoriesByNameFilter(query, location);
|
||||
|
@ -626,7 +626,7 @@ public class SearchPOIActivity extends OsmandListActivity implements SensorEvent
|
|||
searchPOILevel.setEnabled(filter.isSearchFurtherAvailable());
|
||||
searchPOILevel.setText(R.string.search_POI_level_btn);
|
||||
if (isNameFinderFilter()) {
|
||||
if (!Algoritms.isEmpty(((NameFinderPoiFilter) filter).getLastError())) {
|
||||
if (!Algorithms.isEmpty(((NameFinderPoiFilter) filter).getLastError())) {
|
||||
AccessibleToast.makeText(SearchPOIActivity.this, ((NameFinderPoiFilter) filter).getLastError(), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
amenityAdapter.setNewModel(result, "");
|
||||
|
@ -888,13 +888,13 @@ public class SearchPOIActivity extends OsmandListActivity implements SensorEvent
|
|||
setLocation(null);
|
||||
}
|
||||
if (!isRunningOnEmulator() && service.isProviderEnabled(LocationManager.NETWORK_PROVIDER)) {
|
||||
if (!Algoritms.objectEquals(currentLocationProvider, LocationManager.NETWORK_PROVIDER)) {
|
||||
if (!Algorithms.objectEquals(currentLocationProvider, LocationManager.NETWORK_PROVIDER)) {
|
||||
currentLocationProvider = LocationManager.NETWORK_PROVIDER;
|
||||
service.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, GPS_TIMEOUT_REQUEST, GPS_DIST_REQUEST, this);
|
||||
}
|
||||
}
|
||||
} else if (LocationProvider.AVAILABLE == status) {
|
||||
if (!Algoritms.objectEquals(currentLocationProvider, LocationManager.GPS_PROVIDER)) {
|
||||
if (!Algorithms.objectEquals(currentLocationProvider, LocationManager.GPS_PROVIDER)) {
|
||||
currentLocationProvider = LocationManager.GPS_PROVIDER;
|
||||
service.removeUpdates(networkListener);
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@ import java.text.MessageFormat;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.osmand.Algoritms;
|
||||
import net.osmand.data.TransportRoute;
|
||||
import net.osmand.data.TransportStop;
|
||||
import net.osmand.osm.LatLon;
|
||||
|
@ -21,6 +20,7 @@ import net.osmand.plus.TransportIndexRepository;
|
|||
import net.osmand.plus.TransportIndexRepository.RouteInfoLocation;
|
||||
import net.osmand.plus.activities.TransportRouteHelper;
|
||||
import net.osmand.plus.activities.search.SearchActivity.SearchActivityChild;
|
||||
import net.osmand.util.Algorithms;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.app.ListActivity;
|
||||
|
@ -145,8 +145,8 @@ public class SearchTransportActivity extends ListActivity implements SearchActiv
|
|||
}
|
||||
OsmandApplication app = (OsmandApplication) getApplication();
|
||||
LatLon pointToNavigate = app.getTargetPointsHelper().getPointToNavigate();
|
||||
if(!Algoritms.objectEquals(pointToNavigate, this.destinationLocation) ||
|
||||
!Algoritms.objectEquals(startPoint, this.lastKnownMapLocation)){
|
||||
if(!Algorithms.objectEquals(pointToNavigate, this.destinationLocation) ||
|
||||
!Algorithms.objectEquals(startPoint, this.lastKnownMapLocation)){
|
||||
destinationLocation = pointToNavigate;
|
||||
selectedDestinationLocation = destinationLocation;
|
||||
lastKnownMapLocation = startPoint;
|
||||
|
@ -156,7 +156,7 @@ public class SearchTransportActivity extends ListActivity implements SearchActiv
|
|||
|
||||
@Override
|
||||
public void locationUpdate(LatLon l) {
|
||||
if(!Algoritms.objectEquals(l, this.lastKnownMapLocation)){
|
||||
if(!Algorithms.objectEquals(l, this.lastKnownMapLocation)){
|
||||
lastKnownMapLocation = l;
|
||||
searchTransport();
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package net.osmand.plus.api;
|
||||
|
||||
import net.osmand.PlatformUtil;
|
||||
|
||||
import net.osmand.plus.ClientContext;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
package net.osmand.plus.api;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
import android.content.Context;
|
||||
import android.hardware.Sensor;
|
||||
import android.hardware.SensorManager;
|
||||
|
|
|
@ -7,7 +7,6 @@ import net.osmand.binary.BinaryMapIndexReader;
|
|||
import net.osmand.map.ITileSource;
|
||||
import net.osmand.map.TileSourceManager.TileSourceTemplate;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.SearchHistoryHelper;
|
||||
import net.osmand.plus.OsmandSettings.DayNightMode;
|
||||
import net.osmand.plus.SQLiteTileSource;
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@ import java.util.LinkedHashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.osmand.Algoritms;
|
||||
import net.osmand.IProgress;
|
||||
import net.osmand.Location;
|
||||
import net.osmand.PlatformUtil;
|
||||
|
@ -41,6 +40,7 @@ import net.osmand.plus.views.MapInfoLayer;
|
|||
import net.osmand.plus.views.MapStackControl;
|
||||
import net.osmand.plus.views.OsmandMapTileView;
|
||||
import net.osmand.plus.views.TextInfoControl;
|
||||
import net.osmand.util.Algorithms;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
|
@ -722,7 +722,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
|
|||
public void deleteRecording(Recording r) {
|
||||
recordings.unregisterObject(r.lat, r.lon, r);
|
||||
recordingByFileName.remove(r.file.getName());
|
||||
Algoritms.removeAllFiles(r.file);
|
||||
Algorithms.removeAllFiles(r.file);
|
||||
activity.getMapLayers().getContextMenuLayer().setLocation(null, "");
|
||||
activity.getMapView().refreshMap();
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ package net.osmand.plus.development;
|
|||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import net.osmand.SunriseSunset;
|
||||
import net.osmand.plus.OptionsMenuHelper;
|
||||
import net.osmand.plus.OptionsMenuHelper.OnOptionsMenuClick;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
|
@ -13,6 +12,7 @@ import net.osmand.plus.activities.MapActivity;
|
|||
import net.osmand.plus.activities.SettingsActivity;
|
||||
import net.osmand.plus.routing.RouteAnimation;
|
||||
import net.osmand.plus.routing.RoutingHelper;
|
||||
import net.osmand.util.SunriseSunset;
|
||||
import android.content.Intent;
|
||||
import android.os.Debug;
|
||||
import android.os.Debug.MemoryInfo;
|
||||
|
|
|
@ -17,9 +17,6 @@ import java.text.MessageFormat;
|
|||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import net.osmand.Algoritms;
|
||||
import net.osmand.Base64;
|
||||
import net.osmand.IOUtils;
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.access.AccessibleToast;
|
||||
import net.osmand.data.Amenity;
|
||||
|
@ -34,6 +31,8 @@ import net.osmand.plus.OsmandApplication;
|
|||
import net.osmand.plus.OsmandSettings;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.Version;
|
||||
import net.osmand.util.Base64;
|
||||
import net.osmand.util.IOUtils;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.http.HttpResponse;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package net.osmand.plus.osmedit;
|
||||
|
||||
import net.osmand.Algoritms;
|
||||
import net.osmand.access.AccessibleToast;
|
||||
import net.osmand.data.Amenity;
|
||||
import net.osmand.plus.ContextMenuAdapter;
|
||||
|
@ -12,10 +11,11 @@ import net.osmand.plus.R;
|
|||
import net.osmand.plus.activities.EnumAdapter;
|
||||
import net.osmand.plus.activities.LocalIndexInfo;
|
||||
import net.osmand.plus.activities.LocalIndexesActivity;
|
||||
import net.osmand.plus.activities.LocalIndexesActivity.UploadVisibility;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.activities.SettingsActivity;
|
||||
import net.osmand.plus.activities.LocalIndexesActivity.UploadVisibility;
|
||||
import net.osmand.plus.views.OsmandMapTileView;
|
||||
import net.osmand.util.Algorithms;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.Context;
|
||||
|
@ -204,7 +204,7 @@ public class OsmEditingPlugin extends OsmandPlugin {
|
|||
public boolean sendGPXFiles(final LocalIndexesActivity la, final LocalIndexInfo... info){
|
||||
String name = settings.USER_NAME.get();
|
||||
String pwd = settings.USER_PASSWORD.get();
|
||||
if(Algoritms.isEmpty(name) || Algoritms.isEmpty(pwd)){
|
||||
if(Algorithms.isEmpty(name) || Algorithms.isEmpty(pwd)){
|
||||
AccessibleToast.makeText(la, R.string.validate_gpx_upload_name_pwd, Toast.LENGTH_LONG).show();
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ package net.osmand.plus.rastermaps;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
||||
import net.osmand.Algoritms;
|
||||
import net.osmand.ResultMatcher;
|
||||
import net.osmand.map.ITileSource;
|
||||
import net.osmand.map.TileSourceManager.TileSourceTemplate;
|
||||
|
@ -22,6 +21,7 @@ import net.osmand.plus.views.BaseMapLayer;
|
|||
import net.osmand.plus.views.MapTileLayer;
|
||||
import net.osmand.plus.views.OsmandMapTileView;
|
||||
import net.osmand.plus.views.SeekBarPreference;
|
||||
import net.osmand.util.Algorithms;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.DialogInterface;
|
||||
|
@ -98,7 +98,7 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin {
|
|||
public void updateLayer(OsmandMapTileView mapView, OsmandSettings settings,
|
||||
MapTileLayer layer, CommonPreference<String> preference, float layerOrder, boolean warnWhenSelected) {
|
||||
ITileSource overlay = settings.getTileSourceByName(preference.get(), warnWhenSelected);
|
||||
if(!Algoritms.objectEquals(overlay, layer.getMap())){
|
||||
if(!Algorithms.objectEquals(overlay, layer.getMap())){
|
||||
if(overlay == null){
|
||||
mapView.removeLayer(layer);
|
||||
} else {
|
||||
|
|
|
@ -19,10 +19,9 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import net.osmand.Algoritms;
|
||||
import net.osmand.IProgress;
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.NativeLibrary.NativeSearchResult;
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.QuadRect;
|
||||
import net.osmand.access.AccessibleToast;
|
||||
import net.osmand.binary.BinaryMapDataObject;
|
||||
|
@ -44,6 +43,7 @@ import net.osmand.render.RenderingRuleProperty;
|
|||
import net.osmand.render.RenderingRuleSearchRequest;
|
||||
import net.osmand.render.RenderingRuleStorageProperties;
|
||||
import net.osmand.render.RenderingRulesStorage;
|
||||
import net.osmand.util.Algorithms;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
|
@ -463,7 +463,7 @@ public class MapRenderRepositories {
|
|||
} else {
|
||||
CommonPreference<String> settings = prefs.getCustomRenderProperty(customProp.getAttrName());
|
||||
String res = settings.get();
|
||||
if (!Algoritms.isEmpty(res)) {
|
||||
if (!Algorithms.isEmpty(res)) {
|
||||
if (customProp.isString()) {
|
||||
renderingReq.setStringFilter(customProp, res);
|
||||
} else if (customProp.isBoolean()) {
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
package net.osmand.plus.render;
|
||||
|
||||
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.NativeLibrary;
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.plus.render.OsmandRenderer.RenderingContext;
|
||||
import net.osmand.render.RenderingRuleSearchRequest;
|
||||
import net.osmand.render.RenderingRulesStorage;
|
||||
import net.osmand.router.RouteSegmentResult;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
|
|
|
@ -9,10 +9,9 @@ import java.util.LinkedHashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.osmand.Algoritms;
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.NativeLibrary;
|
||||
import net.osmand.NativeLibrary.NativeSearchResult;
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.binary.BinaryMapDataObject;
|
||||
import net.osmand.binary.BinaryMapIndexReader.TagValuePair;
|
||||
import net.osmand.map.MapTileDownloader.IMapDownloaderCallback;
|
||||
|
@ -21,6 +20,7 @@ import net.osmand.plus.render.TextRenderer.TextDrawInfo;
|
|||
import net.osmand.render.RenderingRuleProperty;
|
||||
import net.osmand.render.RenderingRuleSearchRequest;
|
||||
import net.osmand.render.RenderingRulesStorage;
|
||||
import net.osmand.util.Algorithms;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
|
@ -534,13 +534,13 @@ public class OsmandRenderer {
|
|||
p.setStyle(Style.STROKE);
|
||||
p.setStrokeWidth(req.getFloatPropertyValue(rStrokeW));
|
||||
String cap = req.getStringPropertyValue(rCap);
|
||||
if(!Algoritms.isEmpty(cap)){
|
||||
if(!Algorithms.isEmpty(cap)){
|
||||
p.setStrokeCap(Cap.valueOf(cap.toUpperCase()));
|
||||
} else {
|
||||
p.setStrokeCap(Cap.BUTT);
|
||||
}
|
||||
String pathEffect = req.getStringPropertyValue(rPathEff);
|
||||
if (!Algoritms.isEmpty(pathEffect)) {
|
||||
if (!Algorithms.isEmpty(pathEffect)) {
|
||||
p.setPathEffect(getDashEffect(pathEffect));
|
||||
} else {
|
||||
p.setPathEffect(null);
|
||||
|
|
|
@ -9,11 +9,11 @@ import java.util.Map;
|
|||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import net.osmand.Algoritms;
|
||||
import net.osmand.plus.ApplicationMode;
|
||||
import net.osmand.plus.OsmandSettings;
|
||||
import net.osmand.plus.OsmandSettings.CommonPreference;
|
||||
import net.osmand.plus.OsmandSettings.OsmandPreference;
|
||||
import net.osmand.util.Algorithms;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
|
@ -88,7 +88,7 @@ public class MapInfoControls {
|
|||
public void removeApperanceWidgets(String category) {
|
||||
Iterator<MapInfoControlRegInfo> it = appearanceWidgets.iterator();
|
||||
while(it.hasNext()) {
|
||||
if(Algoritms.objectEquals(it.next().category, category)) {
|
||||
if(Algorithms.objectEquals(it.next().category, category)) {
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@ import java.util.EnumSet;
|
|||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import net.osmand.Algoritms;
|
||||
import net.osmand.access.AccessibleToast;
|
||||
import net.osmand.binary.RouteDataObject;
|
||||
import net.osmand.plus.ApplicationMode;
|
||||
|
@ -26,6 +25,7 @@ import net.osmand.plus.routing.RoutingHelper;
|
|||
import net.osmand.plus.views.MapInfoControls.MapInfoControlRegInfo;
|
||||
import net.osmand.render.RenderingRuleProperty;
|
||||
import net.osmand.render.RenderingRulesStorage;
|
||||
import net.osmand.util.Algorithms;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.Context;
|
||||
|
@ -474,7 +474,7 @@ public class MapInfoLayer extends OsmandMapLayer {
|
|||
|
||||
public void fillAppearanceWidgets(Set<MapInfoControlRegInfo> widgets, String category, ArrayList<Object> registry) {
|
||||
for(MapInfoControlRegInfo w : widgets ) {
|
||||
if(Algoritms.objectEquals(w.getCategory(), category)) {
|
||||
if(Algorithms.objectEquals(w.getCategory(), category)) {
|
||||
registry.add(w);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ package net.osmand.plus.views;
|
|||
|
||||
import java.util.Arrays;
|
||||
|
||||
import net.osmand.Algoritms;
|
||||
import net.osmand.GeoidAltitudeCorrection;
|
||||
import net.osmand.Location;
|
||||
import net.osmand.binary.RouteDataObject;
|
||||
|
@ -20,6 +19,7 @@ import net.osmand.plus.routing.RouteCalculationResult.NextDirectionInfo;
|
|||
import net.osmand.plus.routing.RouteDirectionInfo;
|
||||
import net.osmand.plus.routing.RoutingHelper;
|
||||
import net.osmand.router.TurnType;
|
||||
import net.osmand.util.Algorithms;
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
|
@ -69,7 +69,7 @@ public class RouteInfoControls {
|
|||
turnType = null;
|
||||
invalidate();
|
||||
}
|
||||
} else if (!Algoritms.objectEquals(turnType, showStraight ? straight : r.directionInfo.getTurnType())) {
|
||||
} else if (!Algorithms.objectEquals(turnType, showStraight ? straight : r.directionInfo.getTurnType())) {
|
||||
turnType = showStraight ? straight : r.directionInfo.getTurnType();
|
||||
TurnPathHelper.calcTurnPath(pathForTurn, turnType, pathTransform);
|
||||
if (turnType.getExitOut() > 0) {
|
||||
|
@ -158,7 +158,7 @@ public class RouteInfoControls {
|
|||
turnType = null;
|
||||
invalidate();
|
||||
}
|
||||
} else if (!Algoritms.objectEquals(turnType, r.directionInfo.getTurnType())) {
|
||||
} else if (!Algorithms.objectEquals(turnType, r.directionInfo.getTurnType())) {
|
||||
turnType = r.directionInfo.getTurnType();
|
||||
TurnPathHelper.calcTurnPath(pathForTurn, turnType, pathTransform);
|
||||
invalidate();
|
||||
|
|
|
@ -7,12 +7,12 @@ import java.io.File;
|
|||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
|
||||
import net.osmand.Algoritms;
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.access.AccessibleToast;
|
||||
import net.osmand.data.IndexConstants;
|
||||
import net.osmand.map.TileSourceManager.TileSourceTemplate;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.util.Algorithms;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
|
@ -65,7 +65,7 @@ public class YandexTrafficAdapter extends MapTileAdapter {
|
|||
BufferedInputStream in = new BufferedInputStream(new URL("http://jgo.maps.yandex.net/trf/stat.js").openStream(), 1024); //$NON-NLS-1$
|
||||
ByteArrayOutputStream dataStream = new ByteArrayOutputStream();
|
||||
BufferedOutputStream out = new BufferedOutputStream(dataStream, 1024);
|
||||
Algoritms.streamCopy(in, out);
|
||||
Algorithms.streamCopy(in, out);
|
||||
out.flush();
|
||||
String str = dataStream.toString();
|
||||
// JSONObject json = new JSONObject(str.replace("YMaps.TrafficLoader.onLoad(\"stat\",", "").replace("});", "}"));
|
||||
|
@ -78,8 +78,8 @@ public class YandexTrafficAdapter extends MapTileAdapter {
|
|||
}
|
||||
String newTimestamp = str.substring(start, end);
|
||||
lastTimestampUpdated = System.currentTimeMillis();
|
||||
Algoritms.closeStream(in);
|
||||
Algoritms.closeStream(out);
|
||||
Algorithms.closeStream(in);
|
||||
Algorithms.closeStream(out);
|
||||
log.info("Timestamp updated"); //$NON-NLS-1$
|
||||
if (!newTimestamp.equals(mTimestamp)) {
|
||||
mTimestamp = newTimestamp;
|
||||
|
@ -104,7 +104,7 @@ public class YandexTrafficAdapter extends MapTileAdapter {
|
|||
File dir = view.getApplication().getAppPath(IndexConstants.TILES_INDEX_DIR);
|
||||
for (File ds : dir.listFiles()) {
|
||||
if (ds.isDirectory() && ds.getName().startsWith(YANDEX_PREFFIX)) {
|
||||
Algoritms.removeAllFiles(ds);
|
||||
Algorithms.removeAllFiles(ds);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,11 +8,9 @@ import java.util.List;
|
|||
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.plus.ClientContext;
|
||||
import net.osmand.plus.OsmandSettings;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
import android.content.Context;
|
||||
import android.media.MediaPlayer;
|
||||
|
||||
|
||||
|
|
|
@ -5,12 +5,11 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import net.osmand.Algoritms;
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.OsmandSettings;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.SettingsActivity;
|
||||
import net.osmand.util.Algorithms;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
|
@ -71,7 +70,7 @@ public class TTSCommandPlayerImpl extends AbstractPrologCommandPlayer {
|
|||
if (langVal instanceof Struct) {
|
||||
language = ((Struct) langVal).getName();
|
||||
}
|
||||
if (Algoritms.isEmpty(language)) {
|
||||
if (Algorithms.isEmpty(language)) {
|
||||
throw new CommandPlayerException(
|
||||
ctx.getString(R.string.voice_data_corrupted));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue