Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
674a725b0b
5 changed files with 24 additions and 9 deletions
|
@ -127,4 +127,8 @@ public abstract class BasicProgressAsyncTask<Tag, Params, Progress, Result> exte
|
|||
protected void setTag(Tag tag) {
|
||||
this.tag = tag;
|
||||
}
|
||||
|
||||
public Tag getTag() {
|
||||
return tag;
|
||||
}
|
||||
}
|
|
@ -262,11 +262,14 @@ public class DownloadFileHelper {
|
|||
if(mb == 0) {
|
||||
mb = 1;
|
||||
}
|
||||
String taskName = ctx.getString(R.string.shared_string_downloading) + " " +
|
||||
StringBuilder taskName = new StringBuilder();
|
||||
taskName.append(ctx.getString(R.string.shared_string_downloading)).append(": ");
|
||||
//+ de.baseName /*+ " " + mb + " MB"*/;
|
||||
FileNameTranslationHelper.getFileName(ctx, ctx.getRegions(), de.baseName);
|
||||
|
||||
progress.startTask(taskName, len / 1024);
|
||||
taskName.append(FileNameTranslationHelper.getFileName(ctx, ctx.getRegions(), de.baseName));
|
||||
if (de.type != null) {
|
||||
taskName.append(" ").append(de.type.getString(ctx));
|
||||
}
|
||||
progress.startTask(taskName.toString(), len / 1024);
|
||||
if (!de.zipStream) {
|
||||
copyFile(de, progress, fin, len, fin, de.fileToDownload);
|
||||
} else if(de.urlToDownload.contains(".gz")) {
|
||||
|
|
|
@ -119,11 +119,15 @@ public class DownloadIndexesThread {
|
|||
}
|
||||
StringBuilder contentText = new StringBuilder();
|
||||
List<IndexItem> ii = getCurrentDownloadingItems();
|
||||
for(IndexItem i : ii) {
|
||||
if(contentText.length() > 0) {
|
||||
for (IndexItem i : ii) {
|
||||
if (!isFinished && task.getTag() == i) {
|
||||
continue;
|
||||
}
|
||||
if (contentText.length() > 0) {
|
||||
contentText.append(", ");
|
||||
}
|
||||
contentText.append(i.getVisibleName(app, app.getRegions()));
|
||||
contentText.append(" ").append(i.getType().getString(app));
|
||||
}
|
||||
bld.setContentTitle(msg).setSmallIcon(android.R.drawable.stat_sys_download)
|
||||
.setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
|
||||
|
|
|
@ -309,6 +309,9 @@ public class MeasurementEditingContext {
|
|||
public void onRouteCalculated(List<Location> locations) {
|
||||
ArrayList<WptPt> pts = new ArrayList<>(locations.size());
|
||||
for (Location loc : locations) {
|
||||
if(!loc.hasAltitude()){
|
||||
continue;
|
||||
}
|
||||
WptPt pt = new WptPt();
|
||||
pt.lat = loc.getLatitude();
|
||||
pt.lon = loc.getLongitude();
|
||||
|
|
|
@ -268,7 +268,7 @@ public class ParkingPositionPlugin extends OsmandPlugin {
|
|||
}
|
||||
addOrRemoveParkingEvent(false);
|
||||
setParkingPosition(mapActivity, latitude, longitude, false);
|
||||
showContextMenuIfNeeded(mapActivity);
|
||||
showContextMenuIfNeeded(mapActivity,true);
|
||||
mapActivity.getMapView().refreshMap();
|
||||
} else if (index == 2) {
|
||||
if (wasEventPreviouslyAdded) {
|
||||
|
@ -284,10 +284,11 @@ public class ParkingPositionPlugin extends OsmandPlugin {
|
|||
builder.create().show();
|
||||
}
|
||||
|
||||
private void showContextMenuIfNeeded(final MapActivity mapActivity) {
|
||||
private void showContextMenuIfNeeded(final MapActivity mapActivity, boolean animated) {
|
||||
if (parkingLayer != null) {
|
||||
MapContextMenu menu = mapActivity.getContextMenu();
|
||||
if (menu.isVisible()) {
|
||||
menu.hide(animated);
|
||||
menu.show(new LatLon(parkingPosition.getLatitude(), parkingPosition.getLongitude()),
|
||||
parkingLayer.getObjectName(parkingPosition), parkingPosition);
|
||||
}
|
||||
|
@ -388,7 +389,7 @@ public class ParkingPositionPlugin extends OsmandPlugin {
|
|||
} else {
|
||||
addOrRemoveParkingEvent(false);
|
||||
}
|
||||
showContextMenuIfNeeded(mapActivity);
|
||||
showContextMenuIfNeeded(mapActivity,false);
|
||||
}
|
||||
});
|
||||
setTime.create();
|
||||
|
|
Loading…
Reference in a new issue