diff --git a/OsmAnd/src/net/osmand/RegionAddressRepositoryBinary.java b/OsmAnd/src/net/osmand/RegionAddressRepositoryBinary.java index 3c1c56b863..b536162a53 100644 --- a/OsmAnd/src/net/osmand/RegionAddressRepositoryBinary.java +++ b/OsmAnd/src/net/osmand/RegionAddressRepositoryBinary.java @@ -38,6 +38,7 @@ public class RegionAddressRepositoryBinary implements RegionAddressRepository { this.file = file; this.region = name; //This is hack, as collator seems to be broken for "cs"-Czech country, things like Z-ΕΎ don't match, and "cz" fixes this + //Android issue: http://code.google.com/p/android/issues/detail?id=13423 if ("cs".equals(Locale.getDefault().getLanguage())) { this.collator = Collator.getInstance(new Locale("cz", Locale.getDefault().getCountry(),Locale.getDefault().getVariant())); //hack end diff --git a/OsmAnd/src/net/osmand/activities/DayNightHelper.java b/OsmAnd/src/net/osmand/activities/DayNightHelper.java index da42acd729..42df4a28d5 100644 --- a/OsmAnd/src/net/osmand/activities/DayNightHelper.java +++ b/OsmAnd/src/net/osmand/activities/DayNightHelper.java @@ -8,7 +8,6 @@ import net.osmand.LogUtil; import net.osmand.OsmandSettings; import net.osmand.OsmandSettings.DayNightMode; import net.osmand.SunriseSunset; -import net.osmand.render.RendererRegistry; import org.apache.commons.logging.Log; @@ -22,16 +21,17 @@ import android.location.LocationManager; /** * Class to help determine if we want to render day or night map - it uses the - * DayNightMode enumeration for its behavior - it uses the - * {@link RendererRegistry} to check if the night part is present - it uses the - * LightSensor and needs calls from MapActivity on onPause and onResume to - * register/unregister the sensor listener - it uses the {@link SunriseSunset} - * and {@link LocationManager} to find out about sunset/sunrise and use it + * DayNightMode enumeration for its behavior
+ * - it uses the LightSensor and needs calls from MapActivity on onPause and onResume to + * register/unregister the sensor listener
+ * - it uses the {@link SunriseSunset} and {@link LocationManager} to find + * out about sunset/sunrise and use it * * Note: the usage of SunriseSunset is not optimized in any way, it is * recalculated on each demand. If this way it would be resource consuming, some * recalculation threshold could be specified to recalculate the sun-rise/set - * only sometimes. Note2: the light sensor threshold is hard coded to + * only sometimes.
+ * Note2: the light sensor threshold is hard coded to * {@link SensorManager#LIGHT_CLOUDY} and could be made customizable * * @author pavol.zibrita @@ -80,7 +80,7 @@ public class DayNightHelper implements SensorEventListener { return null; } SunriseSunset daynightSwitch = new SunriseSunset(lastKnownLocation.getLatitude(), lastKnownLocation.getLongitude(), - new Date(), TimeZone.getDefault().getRawOffset()); + new Date(), TimeZone.getDefault().getRawOffset()/3600000); boolean daytime = daynightSwitch.isDaytime(); log.debug("Sunrise/sunset setting to day: " + daytime); //$NON-NLS-1$ if (daytime) {