Merge pull request #4100 from osmandapp/alex_branch

Fix
This commit is contained in:
Alexey 2017-07-13 12:48:32 +03:00 committed by GitHub
commit ba03bc6f7c

View file

@ -12,6 +12,7 @@ import android.graphics.PointF;
import android.graphics.PorterDuff.Mode;
import android.graphics.PorterDuffColorFilter;
import android.os.AsyncTask;
import android.os.Build;
import android.support.annotation.NonNull;
import android.view.MotionEvent;
@ -79,7 +80,11 @@ public abstract class OsmandMapLayer {
public <Params> void executeTaskInBackground(AsyncTask<Params, ?, ?> task, Params... params) {
task.execute(params);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, params);
} else {
task.execute(params);
}
}
public boolean isPresentInFullObjects(LatLon latLon) {