Merge branch 'r3.4'

This commit is contained in:
Victor Shcherb 2019-07-13 13:21:06 +02:00
commit cb70a6a631
3 changed files with 9 additions and 6 deletions

View file

@ -246,8 +246,8 @@ public class TrackBitmapDrawer {
}
}
paint.setColor(color == 0 ? trackColor : color);
if(ts.renderer instanceof Renderable.RenderableSegment) {
((Renderable.RenderableSegment)ts.renderer).drawSegment(tileBox.getZoom(), paint, canvas, tileBox);
if (ts.renderer instanceof Renderable.RenderableSegment) {
((Renderable.RenderableSegment) ts.renderer).drawSegment(tileBox.getZoom(), paint, canvas, tileBox);
}
}
}

View file

@ -901,7 +901,7 @@ public class VoiceRouter {
} else if (type == ROUTE_RECALCULATED) {
newCommand.routeRecalculated(left, time);
}
play(newCommand);
VoiceRouter.play(newCommand);
}
}
}

View file

@ -2,18 +2,21 @@ package net.osmand.plus.views;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.os.AsyncTask;
import net.osmand.GPXUtilities.WptPt;
import net.osmand.data.QuadRect;
import net.osmand.data.RotatedTileBox;
import net.osmand.GPXUtilities.WptPt;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
public class Renderable {
private static final Executor THREAD_POOL_EXECUTOR = Executors.newFixedThreadPool(5);
public static abstract class RenderableSegment {
public List<WptPt> points = null; // Original list of points
@ -139,7 +142,7 @@ public class Renderable {
double cullDistance = Math.pow(2.0, segmentSize - zoom); // segmentSize == epsilon
culler = new AsynchronousResampler.RamerDouglasPeucer(this, cullDistance);
culler.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, "");
culler.executeOnExecutor(THREAD_POOL_EXECUTOR, "");
}
}