revert for now, causes error which needs checking out

This commit is contained in:
sonora 2012-09-04 09:37:01 +02:00
parent 840c69ed24
commit 0f532c1f1f

View file

@ -130,14 +130,9 @@ public class OsmandDevelopmentPlugin extends OsmandPlugin {
pref = new Preference(app); pref = new Preference(app);
pref.setTitle(R.string.day_night_info); pref.setTitle(R.string.day_night_info);
if (sunriseSunset != null) { if (sunriseSunset != null) {
//SimpleDateFormat prt = new SimpleDateFormat("dd.MM.yyyy HH:mm"); SimpleDateFormat prt = new SimpleDateFormat("dd.MM.yyyy HH:mm");
//pref.setSummary(activity.getString(R.string.day_night_info_description, prt.format(sunriseSunset.getSunrise()), pref.setSummary(activity.getString(R.string.day_night_info_description, prt.format(sunriseSunset.getSunrise()),
// prt.format(sunriseSunset.getSunset()))); prt.format(sunriseSunset.getSunset())));
//new approach for previous 3 lines from Issue 1313
DateFormat format = SimpleDateFormat.getDateTimeInstance();
String sunrise = format.format(sunriseSunset.getSunrise());
String sunset = format.format(sunriseSunset.getSunset());
pref.setSummary(activity.getString(R.string.day_night_info_description, sunrise, sunset));
} else { } else {
pref.setSummary(activity.getString(R.string.day_night_info_description, "null", pref.setSummary(activity.getString(R.string.day_night_info_description, "null",
"null")); "null"));