diff --git a/OsmAnd/.classpath b/OsmAnd/.classpath index f5d351b60c..668632a181 100644 --- a/OsmAnd/.classpath +++ b/OsmAnd/.classpath @@ -1,7 +1,7 @@ - + diff --git a/OsmAnd/build.xml b/OsmAnd/build.xml index cbf7cb851b..c4f7247ac2 100644 --- a/OsmAnd/build.xml +++ b/OsmAnd/build.xml @@ -150,15 +150,7 @@ - - - - - - - - - + diff --git a/OsmAnd/src/net/osmand/LogUtil.java b/OsmAnd/src/net/osmand/PlatformUtil.java similarity index 99% rename from OsmAnd/src/net/osmand/LogUtil.java rename to OsmAnd/src/net/osmand/PlatformUtil.java index 8c89ca9c14..4a1dd76a83 100644 --- a/OsmAnd/src/net/osmand/LogUtil.java +++ b/OsmAnd/src/net/osmand/PlatformUtil.java @@ -20,7 +20,7 @@ import org.xmlpull.v1.XmlPullParserFactory; * 5. It is impossible to set for all tags debug level (info is default) - android.util.Log#isLoggable(String, int). * */ -public class LogUtil { +public class PlatformUtil { public static String TAG = "net.osmand"; //$NON-NLS-1$ public static boolean AVIAN_LIBRARY = false; private static class OsmandLogImplementation implements Log { diff --git a/OsmAnd/src/net/osmand/plus/AmenityIndexRepositoryBinary.java b/OsmAnd/src/net/osmand/plus/AmenityIndexRepositoryBinary.java index 5b86c0234a..685fd110f8 100644 --- a/OsmAnd/src/net/osmand/plus/AmenityIndexRepositoryBinary.java +++ b/OsmAnd/src/net/osmand/plus/AmenityIndexRepositoryBinary.java @@ -8,7 +8,7 @@ import java.util.List; import java.util.Map; import net.osmand.Algoritms; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.ResultMatcher; import net.osmand.binary.BinaryMapIndexReader; import net.osmand.binary.BinaryMapIndexReader.MapIndex; @@ -23,7 +23,7 @@ import org.apache.commons.logging.Log; public class AmenityIndexRepositoryBinary implements AmenityIndexRepository { - private final static Log log = LogUtil.getLog(AmenityIndexRepositoryBinary.class); + private final static Log log = PlatformUtil.getLog(AmenityIndexRepositoryBinary.class); private final BinaryMapIndexReader index; public AmenityIndexRepositoryBinary(BinaryMapIndexReader index) { diff --git a/OsmAnd/src/net/osmand/plus/AmenityIndexRepositoryOdb.java b/OsmAnd/src/net/osmand/plus/AmenityIndexRepositoryOdb.java index a6a9241c59..1dceaa011c 100644 --- a/OsmAnd/src/net/osmand/plus/AmenityIndexRepositoryOdb.java +++ b/OsmAnd/src/net/osmand/plus/AmenityIndexRepositoryOdb.java @@ -13,7 +13,7 @@ import java.util.Map; import net.osmand.Algoritms; import net.osmand.IProgress; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.ResultMatcher; import net.osmand.data.Amenity; import net.osmand.data.AmenityType; @@ -35,7 +35,7 @@ import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteStatement; public class AmenityIndexRepositoryOdb extends BaseLocationIndexRepository implements AmenityIndexRepository { - private static final Log log = LogUtil.getLog(AmenityIndexRepositoryOdb.class); + private static final Log log = PlatformUtil.getLog(AmenityIndexRepositoryOdb.class); public final static int LIMIT_AMENITIES = 500; diff --git a/OsmAnd/src/net/osmand/plus/AsyncLoadingThread.java b/OsmAnd/src/net/osmand/plus/AsyncLoadingThread.java index 87032e4257..cb8320f975 100644 --- a/OsmAnd/src/net/osmand/plus/AsyncLoadingThread.java +++ b/OsmAnd/src/net/osmand/plus/AsyncLoadingThread.java @@ -7,7 +7,7 @@ import java.util.List; import java.util.Stack; import net.osmand.Algoritms; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.ResultMatcher; import net.osmand.data.Amenity; import net.osmand.data.TransportStop; @@ -27,7 +27,7 @@ public class AsyncLoadingThread extends Thread { public static final int LIMIT_TRANSPORT = 200; - private static final Log log = LogUtil.getLog(AsyncLoadingThread.class); + private static final Log log = PlatformUtil.getLog(AsyncLoadingThread.class); private Handler asyncLoadingPoi; private Handler asyncLoadingTransport; diff --git a/OsmAnd/src/net/osmand/plus/BaseLocationIndexRepository.java b/OsmAnd/src/net/osmand/plus/BaseLocationIndexRepository.java index 3678156488..b5d2f5b131 100644 --- a/OsmAnd/src/net/osmand/plus/BaseLocationIndexRepository.java +++ b/OsmAnd/src/net/osmand/plus/BaseLocationIndexRepository.java @@ -5,7 +5,7 @@ import java.util.ArrayList; import java.util.List; import net.osmand.IProgress; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.data.MapObject; import net.osmand.osm.LatLon; import net.osmand.osm.MapUtils; @@ -17,7 +17,7 @@ import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteStatement; public class BaseLocationIndexRepository { - private static final Log log = LogUtil.getLog(BaseLocationIndexRepository.class); + private static final Log log = PlatformUtil.getLog(BaseLocationIndexRepository.class); protected SQLiteDatabase db; protected double dataTopLatitude; protected double dataBottomLatitude; diff --git a/OsmAnd/src/net/osmand/plus/NavigationService.java b/OsmAnd/src/net/osmand/plus/NavigationService.java index 0cdc25add1..2aaad3927d 100644 --- a/OsmAnd/src/net/osmand/plus/NavigationService.java +++ b/OsmAnd/src/net/osmand/plus/NavigationService.java @@ -1,7 +1,7 @@ package net.osmand.plus; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.access.AccessibleToast; import net.osmand.plus.activities.LiveMonitoringHelper; import net.osmand.plus.activities.MapActivity; @@ -130,7 +130,7 @@ public class NavigationService extends Service implements LocationListener { locationManager.requestLocationUpdates(serviceOffProvider, 0, 0, NavigationService.this); } catch (IllegalArgumentException e) { Toast.makeText(this, R.string.gps_not_available, Toast.LENGTH_LONG).show(); - Log.d(LogUtil.TAG, "GPS location provider not available"); //$NON-NLS-1$ + Log.d(PlatformUtil.TAG, "GPS location provider not available"); //$NON-NLS-1$ } } else { AlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE); diff --git a/OsmAnd/src/net/osmand/plus/OsmandApplication.java b/OsmAnd/src/net/osmand/plus/OsmandApplication.java index 6d06e4425e..055d2b78f4 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandApplication.java +++ b/OsmAnd/src/net/osmand/plus/OsmandApplication.java @@ -13,7 +13,7 @@ import java.util.Locale; import net.osmand.Algoritms; import net.osmand.FavouritePoint; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.access.AccessibleToast; import net.osmand.data.IndexConstants; import net.osmand.plus.GPXUtilities.GPXFile; @@ -57,7 +57,7 @@ import com.bidforfix.andorid.BidForFixHelper; public class OsmandApplication extends Application implements ClientContext { public static final String EXCEPTION_PATH = "exception.log"; //$NON-NLS-1$ - private static final org.apache.commons.logging.Log LOG = LogUtil.getLog(OsmandApplication.class); + private static final org.apache.commons.logging.Log LOG = PlatformUtil.getLog(OsmandApplication.class); ResourceManager manager = null; PoiFiltersHelper poiFilters = null; @@ -574,7 +574,7 @@ public class OsmandApplication extends Application implements ClientContext { defaultHandler.uncaughtException(thread, ex); } catch (Exception e) { // swallow all exceptions - android.util.Log.e(LogUtil.TAG, "Exception while handle other exception", e); //$NON-NLS-1$ + android.util.Log.e(PlatformUtil.TAG, "Exception while handle other exception", e); //$NON-NLS-1$ } } diff --git a/OsmAnd/src/net/osmand/plus/OsmandPlugin.java b/OsmAnd/src/net/osmand/plus/OsmandPlugin.java index 702605d48d..dd1a6f0d63 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandPlugin.java +++ b/OsmAnd/src/net/osmand/plus/OsmandPlugin.java @@ -6,7 +6,7 @@ import java.util.List; import java.util.Set; import net.osmand.IProgress; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.access.AccessibilityPlugin; import net.osmand.plus.activities.LocalIndexInfo; import net.osmand.plus.activities.LocalIndexesActivity.LoadLocalIndexTask; @@ -36,7 +36,7 @@ public abstract class OsmandPlugin { private static List installedPlugins = new ArrayList(); private static List activePlugins = new ArrayList(); - private static final Log LOG = LogUtil.getLog(OsmandPlugin.class); + private static final Log LOG = PlatformUtil.getLog(OsmandPlugin.class); private static final String PARKING_PLUGIN_COMPONENT = "net.osmand.parkingPlugin"; //$NON-NLS-1$ private static final String SRTM_PLUGIN_COMPONENT_PAID = "net.osmand.srtmPlugin.paid"; //$NON-NLS-1$ diff --git a/OsmAnd/src/net/osmand/plus/RegionAddressRepositoryBinary.java b/OsmAnd/src/net/osmand/plus/RegionAddressRepositoryBinary.java index a9f8bf16a5..d4bd13e780 100644 --- a/OsmAnd/src/net/osmand/plus/RegionAddressRepositoryBinary.java +++ b/OsmAnd/src/net/osmand/plus/RegionAddressRepositoryBinary.java @@ -12,7 +12,7 @@ import java.util.TreeMap; import net.osmand.Collator; import net.osmand.CollatorStringMatcher; import net.osmand.CollatorStringMatcher.StringMatcherMode; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.ResultMatcher; import net.osmand.binary.BinaryMapAddressReaderAdapter; import net.osmand.binary.BinaryMapIndexReader; @@ -27,7 +27,7 @@ import org.apache.commons.logging.Log; public class RegionAddressRepositoryBinary implements RegionAddressRepository { - private static final Log log = LogUtil.getLog(RegionAddressRepositoryBinary.class); + private static final Log log = PlatformUtil.getLog(RegionAddressRepositoryBinary.class); private BinaryMapIndexReader file; private String region; @@ -40,8 +40,8 @@ public class RegionAddressRepositoryBinary implements RegionAddressRepository { public RegionAddressRepositoryBinary(BinaryMapIndexReader file, String name) { this.file = file; this.region = name; - this.collator = LogUtil.primaryCollator(); - this.postCodes = new TreeMap(LogUtil.primaryCollator()); + this.collator = PlatformUtil.primaryCollator(); + this.postCodes = new TreeMap(PlatformUtil.primaryCollator()); } @Override diff --git a/OsmAnd/src/net/osmand/plus/ResourceManager.java b/OsmAnd/src/net/osmand/plus/ResourceManager.java index d2ca238c90..2339d1a97b 100644 --- a/OsmAnd/src/net/osmand/plus/ResourceManager.java +++ b/OsmAnd/src/net/osmand/plus/ResourceManager.java @@ -22,7 +22,7 @@ import java.util.TreeMap; import net.osmand.Algoritms; import net.osmand.GeoidAltitudeCorrection; import net.osmand.IProgress; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.ResultMatcher; import net.osmand.binary.BinaryMapIndexReader; import net.osmand.binary.CachedOsmandIndexes; @@ -72,7 +72,7 @@ public class ResourceManager { private static final String INDEXES_CACHE = "ind.cache"; - private static final Log log = LogUtil.getLog(ResourceManager.class); + private static final Log log = PlatformUtil.getLog(ResourceManager.class); private static final String MINE_POI_DB = "mine"+ IndexConstants.POI_INDEX_EXT; diff --git a/OsmAnd/src/net/osmand/plus/SQLiteTileSource.java b/OsmAnd/src/net/osmand/plus/SQLiteTileSource.java index e15ada46b5..2dfe354bb9 100644 --- a/OsmAnd/src/net/osmand/plus/SQLiteTileSource.java +++ b/OsmAnd/src/net/osmand/plus/SQLiteTileSource.java @@ -8,7 +8,7 @@ import java.text.MessageFormat; import java.util.List; import net.osmand.Algoritms; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.data.IndexConstants; import net.osmand.map.ITileSource; import net.osmand.map.TileSourceManager.TileSourceTemplate; @@ -31,7 +31,7 @@ public class SQLiteTileSource implements ITileSource { public static final String EXT = IndexConstants.SQLITE_EXT; - private static final Log log = LogUtil.getLog(SQLiteTileSource.class); + private static final Log log = PlatformUtil.getLog(SQLiteTileSource.class); private ITileSource base; private String urlTemplate = null; diff --git a/OsmAnd/src/net/osmand/plus/TransportIndexRepositoryBinary.java b/OsmAnd/src/net/osmand/plus/TransportIndexRepositoryBinary.java index 4193b69871..4ba72b5ee1 100644 --- a/OsmAnd/src/net/osmand/plus/TransportIndexRepositoryBinary.java +++ b/OsmAnd/src/net/osmand/plus/TransportIndexRepositoryBinary.java @@ -9,7 +9,7 @@ import java.util.Collections; import java.util.Comparator; import java.util.List; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.ResultMatcher; import net.osmand.binary.BinaryMapIndexReader; import net.osmand.binary.BinaryMapIndexReader.SearchRequest; @@ -21,7 +21,7 @@ import net.osmand.osm.MapUtils; import org.apache.commons.logging.Log; public class TransportIndexRepositoryBinary implements TransportIndexRepository { - private static final Log log = LogUtil.getLog(TransportIndexRepositoryBinary.class); + private static final Log log = PlatformUtil.getLog(TransportIndexRepositoryBinary.class); private final BinaryMapIndexReader file; protected List cachedObjects = new ArrayList(); diff --git a/OsmAnd/src/net/osmand/plus/activities/DayNightHelper.java b/OsmAnd/src/net/osmand/plus/activities/DayNightHelper.java index d7333fb621..0531c878c0 100644 --- a/OsmAnd/src/net/osmand/plus/activities/DayNightHelper.java +++ b/OsmAnd/src/net/osmand/plus/activities/DayNightHelper.java @@ -5,7 +5,7 @@ import java.util.Date; import java.util.List; import java.util.TimeZone; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.SunriseSunset; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings.DayNightMode; @@ -38,7 +38,7 @@ import android.location.LocationManager; * @author pavol.zibrita */ public class DayNightHelper implements SensorEventListener { - private static final Log log = LogUtil.getLog(DayNightHelper.class); + private static final Log log = PlatformUtil.getLog(DayNightHelper.class); private final OsmandApplication osmandApplication; diff --git a/OsmAnd/src/net/osmand/plus/activities/DownloadIndexActivity.java b/OsmAnd/src/net/osmand/plus/activities/DownloadIndexActivity.java index 77344c1a29..a297fa574a 100644 --- a/OsmAnd/src/net/osmand/plus/activities/DownloadIndexActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/DownloadIndexActivity.java @@ -16,7 +16,7 @@ import java.util.TreeMap; import net.osmand.Algoritms; import net.osmand.IProgress; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.access.AccessibleToast; import net.osmand.data.IndexConstants; import net.osmand.map.RegionCountry; @@ -66,7 +66,7 @@ import android.widget.Toast; public class DownloadIndexActivity extends OsmandExpandableListActivity { - private static final org.apache.commons.logging.Log log = LogUtil.getLog(DownloadIndexActivity.class); + private static final org.apache.commons.logging.Log log = PlatformUtil.getLog(DownloadIndexActivity.class); /** menus **/ private static final int RELOAD_ID = 0; diff --git a/OsmAnd/src/net/osmand/plus/activities/DownloadTilesDialog.java b/OsmAnd/src/net/osmand/plus/activities/DownloadTilesDialog.java index e43294571b..d3418fe503 100644 --- a/OsmAnd/src/net/osmand/plus/activities/DownloadTilesDialog.java +++ b/OsmAnd/src/net/osmand/plus/activities/DownloadTilesDialog.java @@ -3,7 +3,7 @@ package net.osmand.plus.activities; import java.text.MessageFormat; import java.util.ArrayList; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.access.AccessibleToast; import net.osmand.map.ITileSource; import net.osmand.map.MapTileDownloader; @@ -36,7 +36,7 @@ import android.widget.Toast; public class DownloadTilesDialog { - private final static Log log = LogUtil.getLog(DownloadTilesDialog.class); + private final static Log log = PlatformUtil.getLog(DownloadTilesDialog.class); private final Context ctx; private final OsmandApplication app; private final OsmandMapTileView mapView; diff --git a/OsmAnd/src/net/osmand/plus/activities/LiveMonitoringHelper.java b/OsmAnd/src/net/osmand/plus/activities/LiveMonitoringHelper.java index 4fd96d72b8..bfc06c28d8 100644 --- a/OsmAnd/src/net/osmand/plus/activities/LiveMonitoringHelper.java +++ b/OsmAnd/src/net/osmand/plus/activities/LiveMonitoringHelper.java @@ -7,7 +7,7 @@ import java.text.MessageFormat; import java.util.ArrayList; import java.util.List; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; @@ -29,7 +29,7 @@ public class LiveMonitoringHelper { protected Context ctx; private OsmandSettings settings; private long lastTimeUpdated; - private final static Log log = LogUtil.getLog(LiveMonitoringHelper.class); + private final static Log log = PlatformUtil.getLog(LiveMonitoringHelper.class); public LiveMonitoringHelper(Context ctx){ this.ctx = ctx; diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java index 7779b5a8e2..b485bbda77 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java @@ -8,7 +8,7 @@ import java.util.List; import java.util.Map; import net.osmand.Algoritms; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.access.AccessibilityPlugin; import net.osmand.access.AccessibleActivity; import net.osmand.access.AccessibleAlertBuilder; @@ -241,7 +241,7 @@ public class MapActivity extends AccessibleActivity implements IMapLocationListe location = loc; } } catch (IllegalArgumentException e) { - Log.d(LogUtil.TAG, "Location provider not available"); //$NON-NLS-1$ + Log.d(PlatformUtil.TAG, "Location provider not available"); //$NON-NLS-1$ } } if(location != null){ @@ -402,13 +402,13 @@ public class MapActivity extends AccessibleActivity implements IMapLocationListe try { service.requestLocationUpdates(LocationManager.GPS_PROVIDER, GPS_TIMEOUT_REQUEST, GPS_DIST_REQUEST, gpsListener); } catch (IllegalArgumentException e) { - Log.d(LogUtil.TAG, "GPS location provider not available"); //$NON-NLS-1$ + Log.d(PlatformUtil.TAG, "GPS location provider not available"); //$NON-NLS-1$ } // try to always ask for network provide : it is faster way to find location try { service.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, GPS_TIMEOUT_REQUEST, GPS_DIST_REQUEST, networkListener); } catch (IllegalArgumentException e) { - Log.d(LogUtil.TAG, "Network location provider not available"); //$NON-NLS-1$ + Log.d(PlatformUtil.TAG, "Network location provider not available"); //$NON-NLS-1$ } } @@ -794,21 +794,21 @@ public class MapActivity extends AccessibleActivity implements IMapLocationListe boolean show = overruleRegister || (currentShowingAngle && location != null) || currentMapRotation == OsmandSettings.ROTATE_MAP_COMPASS; // show point view only if gps enabled if (sensorRegistered && !show) { - Log.d(LogUtil.TAG, "Disable sensor"); //$NON-NLS-1$ + Log.d(PlatformUtil.TAG, "Disable sensor"); //$NON-NLS-1$ ((SensorManager) getSystemService(SENSOR_SERVICE)).unregisterListener(this); sensorRegistered = false; previousSensorValue = 0; mapLayers.getLocationLayer().setHeading(null); } else if (!sensorRegistered && show) { - Log.d(LogUtil.TAG, "Enable sensor"); //$NON-NLS-1$ + Log.d(PlatformUtil.TAG, "Enable sensor"); //$NON-NLS-1$ SensorManager sensorMgr = (SensorManager) getSystemService(SENSOR_SERVICE); Sensor s = sensorMgr.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); if (s == null || !sensorMgr.registerListener(this, s, SensorManager.SENSOR_DELAY_UI)) { - Log.e(LogUtil.TAG, "Sensor accelerometer could not be enabled"); + Log.e(PlatformUtil.TAG, "Sensor accelerometer could not be enabled"); } s = sensorMgr.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD); if (s == null || !sensorMgr.registerListener(this, s, SensorManager.SENSOR_DELAY_UI)) { - Log.e(LogUtil.TAG, "Sensor magnetic field could not be enabled"); + Log.e(PlatformUtil.TAG, "Sensor magnetic field could not be enabled"); } // s = sensorMgr.getDefaultSensor(Sensor.TYPE_ORIENTATION); // if (s == null || !sensorMgr.registerListener(this, s, SensorManager.SENSOR_DELAY_UI)) { @@ -870,8 +870,8 @@ public class MapActivity extends AccessibleActivity implements IMapLocationListe } public void setLocation(net.osmand.Location location) { - if (Log.isLoggable(LogUtil.TAG, Log.DEBUG)) { - Log.d(LogUtil.TAG, "Location changed " + location.getProvider()); //$NON-NLS-1$ + if (Log.isLoggable(PlatformUtil.TAG, Log.DEBUG)) { + Log.d(PlatformUtil.TAG, "Location changed " + location.getProvider()); //$NON-NLS-1$ } // 1. Logging services if (location != null) { diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java index 4ba7466ddf..86b36d69f1 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java @@ -18,7 +18,7 @@ import net.osmand.AndroidUtils; import net.osmand.CallbackWithObject; import net.osmand.FavouritePoint; import net.osmand.Location; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.access.AccessibleAlertBuilder; import net.osmand.access.AccessibleToast; import net.osmand.data.Amenity; @@ -331,7 +331,7 @@ public class MapActivityActions implements DialogProvider { mapView.refreshMap(); } } catch(Exception e) { - Log.e(LogUtil.TAG, "Error updating local data", e); //$NON-NLS-1$ + Log.e(PlatformUtil.TAG, "Error updating local data", e); //$NON-NLS-1$ showToast(getString(R.string.update_poi_error_local)); } finally { Dialog prog = mapActivity.getProgressDlg(); diff --git a/OsmAnd/src/net/osmand/plus/activities/NavigatePointActivity.java b/OsmAnd/src/net/osmand/plus/activities/NavigatePointActivity.java index c4e892ad9d..548b834ead 100644 --- a/OsmAnd/src/net/osmand/plus/activities/NavigatePointActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/NavigatePointActivity.java @@ -5,7 +5,7 @@ import java.text.DecimalFormatSymbols; import java.util.Locale; import java.util.StringTokenizer; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.osm.LatLon; import net.osmand.osm.MapUtils; import net.osmand.plus.OsmandApplication; @@ -153,7 +153,7 @@ public class NavigatePointActivity extends Activity implements SearchActivityChi } catch (RuntimeException e) { ((TextView) findViewById(R.id.ValidateTextView)).setVisibility(View.VISIBLE); ((TextView) findViewById(R.id.ValidateTextView)).setText(R.string.invalid_locations); - Log.w(LogUtil.TAG, "Convertion failed", e); //$NON-NLS-1$ + Log.w(PlatformUtil.TAG, "Convertion failed", e); //$NON-NLS-1$ } } @@ -280,7 +280,7 @@ public class NavigatePointActivity extends Activity implements SearchActivityChi } catch (RuntimeException e) { ((TextView) findViewById(R.id.ValidateTextView)).setVisibility(View.VISIBLE); ((TextView) findViewById(R.id.ValidateTextView)).setText(R.string.invalid_locations); - Log.w(LogUtil.TAG, "Convertion failed", e); //$NON-NLS-1$ + Log.w(PlatformUtil.TAG, "Convertion failed", e); //$NON-NLS-1$ } } diff --git a/OsmAnd/src/net/osmand/plus/activities/SavingTrackHelper.java b/OsmAnd/src/net/osmand/plus/activities/SavingTrackHelper.java index 54b497a28b..19b38ff530 100644 --- a/OsmAnd/src/net/osmand/plus/activities/SavingTrackHelper.java +++ b/OsmAnd/src/net/osmand/plus/activities/SavingTrackHelper.java @@ -8,7 +8,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.data.IndexConstants; import net.osmand.osm.LatLon; import net.osmand.plus.GPXUtilities; @@ -46,7 +46,7 @@ public class SavingTrackHelper extends SQLiteOpenHelper { public final static String POINT_COL_LON = "lon"; //$NON-NLS-1$ public final static String POINT_COL_DESCRIPTION = "description"; //$NON-NLS-1$ - public final static Log log = LogUtil.getLog(SavingTrackHelper.class); + public final static Log log = PlatformUtil.getLog(SavingTrackHelper.class); private String updateScript; private String updatePointsScript; diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressOnlineActivity.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressOnlineActivity.java index d4a2cccaa0..78a1fe8c08 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressOnlineActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressOnlineActivity.java @@ -10,7 +10,7 @@ import java.util.Locale; import net.londatiga.android.QuickAction; import net.osmand.Algoritms; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.access.AccessibleToast; import net.osmand.osm.LatLon; import net.osmand.osm.MapUtils; @@ -45,7 +45,7 @@ public class SearchAddressOnlineActivity extends OsmandListActivity implements S private LatLon location; private ProgressDialog progressDlg; - private final static Log log = LogUtil.getLog(SearchAddressOnlineActivity.class); + private final static Log log = PlatformUtil.getLog(SearchAddressOnlineActivity.class); private static PlacesAdapter lastResult = null; private OsmandSettings settings; diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchByNameAbstractActivity.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchByNameAbstractActivity.java index af0b8968ee..7a0168448a 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchByNameAbstractActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchByNameAbstractActivity.java @@ -12,7 +12,7 @@ import java.util.Map; import net.osmand.Collator; import net.osmand.CollatorStringMatcher; import net.osmand.CollatorStringMatcher.StringMatcherMode; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.data.MapObject; import net.osmand.osm.LatLon; import net.osmand.plus.OsmandApplication; @@ -70,7 +70,7 @@ public abstract class SearchByNameAbstractActivity extends OsmandListActivity private T endingObject; private StyleSpan previousSpan; private CustomTitleBar titleBar; - private static final Log log = LogUtil.getLog(SearchByNameAbstractActivity.class); + private static final Log log = PlatformUtil.getLog(SearchByNameAbstractActivity.class); @Override protected void onCreate(Bundle savedInstanceState) { @@ -87,7 +87,7 @@ public abstract class SearchByNameAbstractActivity extends OsmandListActivity final NamesAdapter namesAdapter = new NamesAdapter(new ArrayList(), createComparator()); //$NON-NLS-1$ setListAdapter(namesAdapter); - collator = LogUtil.primaryCollator(); + collator = PlatformUtil.primaryCollator(); progress = (ProgressBar) findViewById(R.id.ProgressBar); diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchCityByNameActivity.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchCityByNameActivity.java index e1524cf625..48bedaa82b 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchCityByNameActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchCityByNameActivity.java @@ -6,7 +6,7 @@ import java.util.List; import net.osmand.CollatorStringMatcher; import net.osmand.CollatorStringMatcher.StringMatcherMode; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.ResultMatcher; import net.osmand.data.City; import net.osmand.data.City.CityType; @@ -180,7 +180,7 @@ public class SearchCityByNameActivity extends SearchByNameAbstractActivity private CityComparator(StringMatcherMode startsWith, boolean en) { this.startsWith = startsWith; - this.cs = LogUtil.primaryCollator(); + this.cs = PlatformUtil.primaryCollator(); this.en = en; } diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java index e102619257..5294c68efa 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java @@ -18,7 +18,7 @@ import java.util.Map.Entry; import net.londatiga.android.ActionItem; import net.londatiga.android.QuickAction; import net.osmand.Algoritms; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.ResultMatcher; import net.osmand.access.AccessibleToast; import net.osmand.access.NavigationInfo; @@ -480,14 +480,14 @@ public class SearchPOIActivity extends OsmandListActivity implements SensorEvent // show point view only if gps enabled if(location == null){ if(sensorRegistered) { - Log.d(LogUtil.TAG, "Disable sensor"); //$NON-NLS-1$ + Log.d(PlatformUtil.TAG, "Disable sensor"); //$NON-NLS-1$ ((SensorManager) getSystemService(SENSOR_SERVICE)).unregisterListener(this); sensorRegistered = false; heading = null; } } else { if(!sensorRegistered){ - Log.d(LogUtil.TAG, "Enable sensor"); //$NON-NLS-1$ + Log.d(PlatformUtil.TAG, "Enable sensor"); //$NON-NLS-1$ SensorManager sensorMgr = (SensorManager) getSystemService(SENSOR_SERVICE); Sensor s = sensorMgr.getDefaultSensor(Sensor.TYPE_ORIENTATION); if (s != null) { diff --git a/OsmAnd/src/net/osmand/plus/api/AudioFocusHelperImpl.java b/OsmAnd/src/net/osmand/plus/api/AudioFocusHelperImpl.java index fb1f5691c7..7e420d9f9f 100644 --- a/OsmAnd/src/net/osmand/plus/api/AudioFocusHelperImpl.java +++ b/OsmAnd/src/net/osmand/plus/api/AudioFocusHelperImpl.java @@ -1,6 +1,6 @@ package net.osmand.plus.api; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.plus.ClientContext; @@ -16,7 +16,7 @@ import android.media.AudioManager; * @author genly */ public class AudioFocusHelperImpl implements AudioManager.OnAudioFocusChangeListener, net.osmand.plus.api.ExternalServiceAPI.AudioFocusHelper { - private static final Log log = LogUtil.getLog(AudioFocusHelperImpl.class); + private static final Log log = PlatformUtil.getLog(AudioFocusHelperImpl.class); @Override public boolean requestFocus(ClientContext context, int streamType) { diff --git a/OsmAnd/src/net/osmand/plus/api/ExternalServiceAPIImpl.java b/OsmAnd/src/net/osmand/plus/api/ExternalServiceAPIImpl.java index 2967887478..e382ef9437 100644 --- a/OsmAnd/src/net/osmand/plus/api/ExternalServiceAPIImpl.java +++ b/OsmAnd/src/net/osmand/plus/api/ExternalServiceAPIImpl.java @@ -2,7 +2,7 @@ package net.osmand.plus.api; import org.apache.commons.logging.Log; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.plus.OsmandApplication; import android.content.Context; import android.hardware.Sensor; @@ -14,7 +14,7 @@ import android.os.Environment; public class ExternalServiceAPIImpl implements ExternalServiceAPI { private OsmandApplication app; - private static final Log log = LogUtil.getLog(ExternalServiceAPIImpl.class); + private static final Log log = PlatformUtil.getLog(ExternalServiceAPIImpl.class); public ExternalServiceAPIImpl(OsmandApplication app) { this.app = app; diff --git a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java index 497b79dd0e..1ae257f9d8 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java @@ -17,7 +17,7 @@ import java.util.Map; import net.osmand.Algoritms; import net.osmand.IProgress; import net.osmand.Location; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.access.AccessibleAlertBuilder; import net.osmand.access.AccessibleToast; import net.osmand.data.DataTileManager; @@ -83,7 +83,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin { private static final String THREEGP_EXTENSION = "3gp"; private static final String MPEG4_EXTENSION = "mp4"; private static final String IMG_EXTENSION = "jpg"; - private static final Log log = LogUtil.getLog(AudioVideoNotesPlugin.class); + private static final Log log = PlatformUtil.getLog(AudioVideoNotesPlugin.class); private static Method mRegisterMediaButtonEventReceiver; private static Method mUnregisterMediaButtonEventReceiver; private OsmandApplication app; diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadOsmandIndexesHelper.java b/OsmAnd/src/net/osmand/plus/download/DownloadOsmandIndexesHelper.java index a7dfd19e48..5c63da1e85 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadOsmandIndexesHelper.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadOsmandIndexesHelper.java @@ -7,7 +7,7 @@ import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.data.IndexConstants; import net.osmand.plus.ClientContext; import net.osmand.plus.OsmandApplication; @@ -26,7 +26,7 @@ import android.content.pm.PackageManager.NameNotFoundException; import android.content.res.AssetManager; public class DownloadOsmandIndexesHelper { - private final static Log log = LogUtil.getLog(DownloadOsmandIndexesHelper.class); + private final static Log log = PlatformUtil.getLog(DownloadOsmandIndexesHelper.class); public static IndexFileList getIndexesList(Context ctx) { diff --git a/OsmAnd/src/net/osmand/plus/dropbox/DropboxPlugin.java b/OsmAnd/src/net/osmand/plus/dropbox/DropboxPlugin.java index 3c837b665f..23981701ae 100644 --- a/OsmAnd/src/net/osmand/plus/dropbox/DropboxPlugin.java +++ b/OsmAnd/src/net/osmand/plus/dropbox/DropboxPlugin.java @@ -1,6 +1,6 @@ package net.osmand.plus.dropbox; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandPlugin; import net.osmand.plus.OsmandSettings; @@ -26,7 +26,7 @@ import com.dropbox.client2.session.Session.AccessType; public class DropboxPlugin extends OsmandPlugin { public static final String ID = "osmand.dropbox"; - private static final Log log = LogUtil.getLog(DropboxPlugin.class); + private static final Log log = PlatformUtil.getLog(DropboxPlugin.class); private OsmandApplication app; private DropboxAPI mApi; diff --git a/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java b/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java index af0802f949..f45d827369 100644 --- a/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java +++ b/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java @@ -4,7 +4,7 @@ import java.util.EnumSet; import net.londatiga.android.ActionItem; import net.londatiga.android.QuickAction; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.plus.ApplicationMode; import net.osmand.plus.ContextMenuAdapter; import net.osmand.plus.ContextMenuAdapter.OnContextMenuClick; @@ -42,7 +42,7 @@ public class OsmandMonitoringPlugin extends OsmandPlugin implements MonitoringIn private static final String ID = "osmand.monitoring"; private OsmandSettings settings; private OsmandApplication app; - private static final Log log = LogUtil.getLog(OsmandMonitoringPlugin.class); + private static final Log log = PlatformUtil.getLog(OsmandMonitoringPlugin.class); private MapInfoControl monitoringControl; public OsmandMonitoringPlugin(OsmandApplication app) { diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapLocalUtil.java b/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapLocalUtil.java index 7b443dc54d..503bf6d5d7 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapLocalUtil.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapLocalUtil.java @@ -2,7 +2,7 @@ package net.osmand.plus.osmedit; import java.util.Map; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.access.AccessibleToast; import net.osmand.data.Amenity; import net.osmand.data.AmenityType; @@ -28,7 +28,7 @@ public class OpenstreetmapLocalUtil extends AbstractOpenstreetmapUtil { //temporal IDs for not yet uploaded new POIs private long nextid; - public final static Log log = LogUtil.getLog(OpenstreetmapLocalUtil.class); + public final static Log log = PlatformUtil.getLog(OpenstreetmapLocalUtil.class); public OpenstreetmapLocalUtil(Context uiContext) { this.ctx = uiContext; diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapRemoteUtil.java b/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapRemoteUtil.java index 52c008e2cd..80cb6525de 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapRemoteUtil.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapRemoteUtil.java @@ -20,7 +20,7 @@ import java.util.Map; import net.osmand.Algoritms; import net.osmand.Base64; import net.osmand.IOUtils; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.access.AccessibleToast; import net.osmand.data.Amenity; import net.osmand.osm.Entity; @@ -71,7 +71,7 @@ public class OpenstreetmapRemoteUtil extends AbstractOpenstreetmapUtil { private long changeSetId = NO_CHANGESET_ID; private long changeSetTimeStamp = NO_CHANGESET_ID; - public final static Log log = LogUtil.getLog(OpenstreetmapRemoteUtil.class); + public final static Log log = PlatformUtil.getLog(OpenstreetmapRemoteUtil.class); private OsmandSettings settings; diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsLayer.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsLayer.java index 75c198e55c..51ffd1776d 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsLayer.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsLayer.java @@ -12,7 +12,7 @@ import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.access.AccessibleToast; import net.osmand.osm.LatLon; import net.osmand.plus.ContextMenuAdapter; @@ -49,7 +49,7 @@ import android.widget.Toast; public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider, DialogProvider { - private static final Log log = LogUtil.getLog(OsmBugsLayer.class); + private static final Log log = PlatformUtil.getLog(OsmBugsLayer.class); private final static int startZoom = 8; private final int SEARCH_LIMIT = 100; diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsRemoteUtil.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsRemoteUtil.java index 9eb00af12b..e51d7f3305 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsRemoteUtil.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsRemoteUtil.java @@ -7,13 +7,13 @@ import java.net.URL; import java.net.URLConnection; import java.net.URLEncoder; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import org.apache.commons.logging.Log; public class OsmBugsRemoteUtil implements OsmBugsUtil { - private static final Log log = LogUtil.getLog(OsmBugsRemoteUtil.class); + private static final Log log = PlatformUtil.getLog(OsmBugsRemoteUtil.class); private final static String SITE_API = "http://openstreetbugs.schokokeks.org/api/0.1/"; //$NON-NLS-1$ diff --git a/OsmAnd/src/net/osmand/plus/osmodroid/OsMoDroidPlugin.java b/OsmAnd/src/net/osmand/plus/osmodroid/OsMoDroidPlugin.java index 17ee62a591..ba1bcf9636 100644 --- a/OsmAnd/src/net/osmand/plus/osmodroid/OsMoDroidPlugin.java +++ b/OsmAnd/src/net/osmand/plus/osmodroid/OsMoDroidPlugin.java @@ -1,6 +1,6 @@ package net.osmand.plus.osmodroid; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandPlugin; import net.osmand.plus.R; @@ -20,7 +20,7 @@ import com.OsMoDroid.IRemoteOsMoDroidService; public class OsMoDroidPlugin extends OsmandPlugin { public static final String ID = "osmand.osmodroid"; - private static final Log log = LogUtil.getLog(OsMoDroidPlugin.class); + private static final Log log = PlatformUtil.getLog(OsMoDroidPlugin.class); private OsmandApplication app; IRemoteOsMoDroidService mIRemoteService; private ServiceConnection mConnection; diff --git a/OsmAnd/src/net/osmand/plus/render/MapRenderRepositories.java b/OsmAnd/src/net/osmand/plus/render/MapRenderRepositories.java index 2ddde84877..7f57a42271 100644 --- a/OsmAnd/src/net/osmand/plus/render/MapRenderRepositories.java +++ b/OsmAnd/src/net/osmand/plus/render/MapRenderRepositories.java @@ -21,7 +21,7 @@ import java.util.Set; import net.osmand.Algoritms; import net.osmand.IProgress; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.NativeLibrary.NativeSearchResult; import net.osmand.QuadRect; import net.osmand.access.AccessibleToast; @@ -62,7 +62,7 @@ public class MapRenderRepositories { public static boolean checkForDuplicateObjectIds = true; - private final static Log log = LogUtil.getLog(MapRenderRepositories.class); + private final static Log log = PlatformUtil.getLog(MapRenderRepositories.class); private final OsmandApplication context; private final static int BASEMAP_ZOOM = 11; private Handler handler; diff --git a/OsmAnd/src/net/osmand/plus/render/NativeOsmandLibrary.java b/OsmAnd/src/net/osmand/plus/render/NativeOsmandLibrary.java index 89ce55a32f..bf202c4e7a 100644 --- a/OsmAnd/src/net/osmand/plus/render/NativeOsmandLibrary.java +++ b/OsmAnd/src/net/osmand/plus/render/NativeOsmandLibrary.java @@ -1,7 +1,7 @@ package net.osmand.plus.render; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.NativeLibrary; import net.osmand.plus.render.OsmandRenderer.RenderingContext; import net.osmand.render.RenderingRuleSearchRequest; @@ -13,7 +13,7 @@ import org.apache.commons.logging.Log; import android.graphics.Bitmap; public class NativeOsmandLibrary extends NativeLibrary { - private static final Log log = LogUtil.getLog(NativeOsmandLibrary.class); + private static final Log log = PlatformUtil.getLog(NativeOsmandLibrary.class); private static NativeOsmandLibrary library; private static Boolean isNativeSupported = null; @@ -33,7 +33,7 @@ public class NativeOsmandLibrary extends NativeLibrary { System.loadLibrary("gnustl_shared"); log.debug("Loading native cpufeatures_proxy..."); //$NON-NLS-1$ System.loadLibrary("cpufeatures_proxy"); - if (LogUtil.AVIAN_LIBRARY) { + if (PlatformUtil.AVIAN_LIBRARY) { log.debug("Loading load routing test..."); //$NON-NLS-1$ System.loadLibrary("routing_test"); testRoutingPing(); diff --git a/OsmAnd/src/net/osmand/plus/render/OsmandRenderer.java b/OsmAnd/src/net/osmand/plus/render/OsmandRenderer.java index 77e740125f..603fdfc7b7 100644 --- a/OsmAnd/src/net/osmand/plus/render/OsmandRenderer.java +++ b/OsmAnd/src/net/osmand/plus/render/OsmandRenderer.java @@ -10,7 +10,7 @@ import java.util.List; import java.util.Map; import net.osmand.Algoritms; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.NativeLibrary; import net.osmand.NativeLibrary.NativeSearchResult; import net.osmand.binary.BinaryMapDataObject; @@ -49,7 +49,7 @@ import android.util.FloatMath; import android.view.WindowManager; public class OsmandRenderer { - private static final Log log = LogUtil.getLog(OsmandRenderer.class); + private static final Log log = PlatformUtil.getLog(OsmandRenderer.class); private Paint paint; diff --git a/OsmAnd/src/net/osmand/plus/render/RenderingIcons.java b/OsmAnd/src/net/osmand/plus/render/RenderingIcons.java index 48c8369c9f..c9b09eafd6 100644 --- a/OsmAnd/src/net/osmand/plus/render/RenderingIcons.java +++ b/OsmAnd/src/net/osmand/plus/render/RenderingIcons.java @@ -6,7 +6,7 @@ import java.lang.reflect.Field; import java.util.LinkedHashMap; import java.util.Map; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.plus.R; import net.osmand.plus.R.drawable; @@ -18,7 +18,7 @@ import android.util.DisplayMetrics; import android.view.WindowManager; public class RenderingIcons { - private static final Log log = LogUtil.getLog(RenderingIcons.class); + private static final Log log = PlatformUtil.getLog(RenderingIcons.class); private static Map icons = new LinkedHashMap(); private static Map iconsBmp = new LinkedHashMap(); diff --git a/OsmAnd/src/net/osmand/plus/srtmplugin/SRTMPlugin.java b/OsmAnd/src/net/osmand/plus/srtmplugin/SRTMPlugin.java index dbc8bbc3d1..e68d7fbf3e 100644 --- a/OsmAnd/src/net/osmand/plus/srtmplugin/SRTMPlugin.java +++ b/OsmAnd/src/net/osmand/plus/srtmplugin/SRTMPlugin.java @@ -1,6 +1,6 @@ package net.osmand.plus.srtmplugin; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandPlugin; import net.osmand.plus.R; @@ -11,7 +11,7 @@ import org.apache.commons.logging.Log; public class SRTMPlugin extends OsmandPlugin { public static final String ID = "osmand.srtm"; - private static final Log log = LogUtil.getLog(SRTMPlugin.class); + private static final Log log = PlatformUtil.getLog(SRTMPlugin.class); private OsmandApplication app; private boolean paid; diff --git a/OsmAnd/src/net/osmand/plus/views/AnimateDraggingMapThread.java b/OsmAnd/src/net/osmand/plus/views/AnimateDraggingMapThread.java index 1665481a74..ce7d2aab16 100644 --- a/OsmAnd/src/net/osmand/plus/views/AnimateDraggingMapThread.java +++ b/OsmAnd/src/net/osmand/plus/views/AnimateDraggingMapThread.java @@ -1,6 +1,6 @@ package net.osmand.plus.views; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.osm.MapUtils; import org.apache.commons.logging.Log; @@ -17,7 +17,7 @@ import android.view.animation.LinearInterpolator; */ public class AnimateDraggingMapThread { - protected static final Log log = LogUtil.getLog(AnimateDraggingMapThread.class); + protected static final Log log = PlatformUtil.getLog(AnimateDraggingMapThread.class); private final static float DRAGGING_ANIMATION_TIME = 1200f; private final static float ZOOM_ANIMATION_TIME = 800f; diff --git a/OsmAnd/src/net/osmand/plus/views/MultiTouchSupport.java b/OsmAnd/src/net/osmand/plus/views/MultiTouchSupport.java index 579c7e848b..e982afbcdb 100644 --- a/OsmAnd/src/net/osmand/plus/views/MultiTouchSupport.java +++ b/OsmAnd/src/net/osmand/plus/views/MultiTouchSupport.java @@ -2,7 +2,7 @@ package net.osmand.plus.views; import java.lang.reflect.Method; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import org.apache.commons.logging.Log; @@ -14,7 +14,7 @@ import android.view.MotionEvent; public class MultiTouchSupport { - private static final Log log = LogUtil.getLog(MultiTouchSupport.class); + private static final Log log = PlatformUtil.getLog(MultiTouchSupport.class); public static final int ACTION_MASK = 255; public static final int ACTION_POINTER_ID_SHIFT = 8; diff --git a/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java b/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java index 6ef7f97a6b..6af69b7a5e 100644 --- a/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java +++ b/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java @@ -6,7 +6,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.access.AccessibleToast; import net.osmand.access.MapExplorer; import net.osmand.map.IMapLocationListener; @@ -69,7 +69,7 @@ public class OsmandMapTileView extends SurfaceView implements IMapDownloaderCall public boolean onPressEvent(PointF point); } - protected static final Log log = LogUtil.getLog(OsmandMapTileView.class); + protected static final Log log = PlatformUtil.getLog(OsmandMapTileView.class); /**MapTree * zoom level - could be float to show zoomed tiles */ diff --git a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java index ce5cad698d..4fecf68dfa 100644 --- a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java @@ -5,7 +5,7 @@ import gnu.trove.set.hash.TIntHashSet; import java.util.ArrayList; import java.util.List; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.access.AccessibleToast; import net.osmand.data.Amenity; import net.osmand.data.AmenityType; @@ -40,7 +40,7 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon private static final int startZoom = 10; public static final int TEXT_WRAP = 15; public static final int TEXT_LINES = 3; - public static final org.apache.commons.logging.Log log = LogUtil.getLog(POIMapLayer.class); + public static final org.apache.commons.logging.Log log = PlatformUtil.getLog(POIMapLayer.class); private Paint pointAltUI; diff --git a/OsmAnd/src/net/osmand/plus/views/YandexTrafficAdapter.java b/OsmAnd/src/net/osmand/plus/views/YandexTrafficAdapter.java index b83c5377aa..9df482ba67 100644 --- a/OsmAnd/src/net/osmand/plus/views/YandexTrafficAdapter.java +++ b/OsmAnd/src/net/osmand/plus/views/YandexTrafficAdapter.java @@ -8,7 +8,7 @@ import java.io.IOException; import java.net.URL; import net.osmand.Algoritms; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.access.AccessibleToast; import net.osmand.data.IndexConstants; import net.osmand.map.TileSourceManager.TileSourceTemplate; @@ -22,7 +22,7 @@ import android.widget.Toast; public class YandexTrafficAdapter extends MapTileAdapter { - private final static Log log = LogUtil.getLog(MapTileLayer.class); + private final static Log log = PlatformUtil.getLog(MapTileLayer.class); private final static String YANDEX_PREFFIX = ".YandexTraffic_"; private static final long DELTA = 10 * 60 * 1000; diff --git a/OsmAnd/src/net/osmand/plus/voice/MediaCommandPlayerImpl.java b/OsmAnd/src/net/osmand/plus/voice/MediaCommandPlayerImpl.java index 97d33145fa..38b9994f43 100644 --- a/OsmAnd/src/net/osmand/plus/voice/MediaCommandPlayerImpl.java +++ b/OsmAnd/src/net/osmand/plus/voice/MediaCommandPlayerImpl.java @@ -6,7 +6,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.plus.ClientContext; import net.osmand.plus.OsmandSettings; @@ -26,7 +26,7 @@ public class MediaCommandPlayerImpl extends AbstractPrologCommandPlayer implemen private static final String CONFIG_FILE = "_config.p"; private static final int[] MEDIA_VOICE_VERSION = new int[] { 0 }; // MUST BE SORTED, list of supported versions - private static final Log log = LogUtil.getLog(MediaCommandPlayerImpl.class); + private static final Log log = PlatformUtil.getLog(MediaCommandPlayerImpl.class); // playing media private MediaPlayer mediaPlayer; diff --git a/OsmAnd/src/net/osmand/plus/voice/TTSCommandPlayerImpl.java b/OsmAnd/src/net/osmand/plus/voice/TTSCommandPlayerImpl.java index 64e873d19b..567da52686 100644 --- a/OsmAnd/src/net/osmand/plus/voice/TTSCommandPlayerImpl.java +++ b/OsmAnd/src/net/osmand/plus/voice/TTSCommandPlayerImpl.java @@ -6,7 +6,7 @@ import java.util.List; import java.util.Locale; import net.osmand.Algoritms; -import net.osmand.LogUtil; +import net.osmand.PlatformUtil; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; @@ -58,7 +58,7 @@ public class TTSCommandPlayerImpl extends AbstractPrologCommandPlayer { private static final String CONFIG_FILE = "_ttsconfig.p"; private static final int[] TTS_VOICE_VERSION = new int[] { 100, 101 }; // !! MUST BE SORTED - private static final Log log = LogUtil.getLog(TTSCommandPlayerImpl.class); + private static final Log log = PlatformUtil.getLog(TTSCommandPlayerImpl.class); private TextToSpeech mTts; private Context mTtsContext; private String language;