Remove unnecessary date format initialization

This commit is contained in:
Vitaliy 2020-06-19 19:42:24 +03:00
parent d5c3050f3a
commit a348dc36cc

View file

@ -73,9 +73,11 @@ public class SelectedGpxMenuBuilder extends MenuBuilder {
false, null, false, 0, false, false, false, null, false);
DateFormat startFormat = SimpleDateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
DateFormat endFormat = SimpleDateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
DateFormat endFormat;
if (OsmAndFormatter.isSameDay(analysis.startTime, analysis.endTime)) {
endFormat = SimpleDateFormat.getTimeInstance(DateFormat.SHORT);
} else {
endFormat = SimpleDateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT)
}
String startEndTimeTitle = app.getString(R.string.shared_string_start_time) + " - " + app.getString(R.string.shared_string_end_time);
buildRow(view, getThemedIcon(R.drawable.ic_action_time_start), null, startEndTimeTitle,