Revert "Fix possible CalledFromWrongThreadException"
This reverts commit f95c97ff15
.
This commit is contained in:
parent
477365f27a
commit
9d68026b38
3 changed files with 7 additions and 18 deletions
|
@ -1002,6 +1002,7 @@ public class MeasurementEditingContext implements IRouteSettingsListener {
|
|||
pts.add(pt);
|
||||
}
|
||||
calculatedPairs++;
|
||||
params.calculationProgressCallback.updateProgress(0);
|
||||
List<RouteSegmentResult> originalRoute = route.getOriginalRoute();
|
||||
if (Algorithms.isEmpty(originalRoute)) {
|
||||
originalRoute = Collections.singletonList(RoutePlannerFrontEnd.generateStraightLineSegment(
|
||||
|
@ -1011,7 +1012,6 @@ public class MeasurementEditingContext implements IRouteSettingsListener {
|
|||
application.runInUIThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
params.calculationProgressCallback.updateProgress(0);
|
||||
updateSegmentsForSnap(true, false);
|
||||
progressListener.refresh();
|
||||
RouteCalculationParams params = getParams(false);
|
||||
|
|
|
@ -232,17 +232,11 @@ class RouteRecalculationHelper {
|
|||
}
|
||||
|
||||
void startProgress(final RouteCalculationParams params) {
|
||||
app.runInUIThread(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (params.calculationProgressCallback != null) {
|
||||
params.calculationProgressCallback.start();
|
||||
} else if (progressRoute != null) {
|
||||
progressRoute.start();
|
||||
}
|
||||
}
|
||||
});
|
||||
if (params.calculationProgressCallback != null) {
|
||||
params.calculationProgressCallback.start();
|
||||
} else if (progressRoute != null) {
|
||||
progressRoute.start();
|
||||
}
|
||||
}
|
||||
|
||||
void updateProgress(final RouteCalculationParams params) {
|
||||
|
|
|
@ -237,12 +237,7 @@ public class TransportRoutingHelper {
|
|||
private void startProgress(final TransportRouteCalculationParams params) {
|
||||
final TransportRouteCalculationProgressCallback progressRoute = this.progressRoute;
|
||||
if (progressRoute != null) {
|
||||
app.runInUIThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
progressRoute.start();
|
||||
}
|
||||
}, 300);
|
||||
progressRoute.start();
|
||||
}
|
||||
setCurrentRoute(-1);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue