diff --git a/OsmAnd/src/net/osmand/plus/CurrentPositionHelper.java b/OsmAnd/src/net/osmand/plus/CurrentPositionHelper.java index a811f068ec..190b4b6ebe 100644 --- a/OsmAnd/src/net/osmand/plus/CurrentPositionHelper.java +++ b/OsmAnd/src/net/osmand/plus/CurrentPositionHelper.java @@ -99,7 +99,7 @@ public class CurrentPositionHelper { } return null; } - }.execute((Void) null); + }.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR, (Void) null); res = true; } return res; diff --git a/OsmAndCore-sample/src/net/osmand/core/samples/android/sample1/CurrentPositionHelper.java b/OsmAndCore-sample/src/net/osmand/core/samples/android/sample1/CurrentPositionHelper.java index 984c69fe6c..79b70288d2 100644 --- a/OsmAndCore-sample/src/net/osmand/core/samples/android/sample1/CurrentPositionHelper.java +++ b/OsmAndCore-sample/src/net/osmand/core/samples/android/sample1/CurrentPositionHelper.java @@ -103,7 +103,7 @@ public class CurrentPositionHelper { } return null; } - }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, (Void) null); + }.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR, (Void) null); res = true; } return res;