fix route recalculation and screen update issue on MapActivity resume
This commit is contained in:
parent
e0fc9843f2
commit
8fad1a477f
2 changed files with 12 additions and 6 deletions
|
@ -124,7 +124,15 @@ public class TargetPointsHelper {
|
|||
return intermediatePoints;
|
||||
}
|
||||
|
||||
|
||||
public List<LatLon> getIntermediatePointsLatLon() {
|
||||
List<LatLon> intermediatePointsLatLon = new ArrayList<LatLon>();
|
||||
|
||||
for (TargetPoint t : intermediatePoints) {
|
||||
intermediatePointsLatLon.add(t.point);
|
||||
}
|
||||
|
||||
return intermediatePointsLatLon;
|
||||
}
|
||||
|
||||
public List<TargetPoint> getIntermediatePointsWithTarget() {
|
||||
List<TargetPoint> res = new ArrayList<TargetPoint>();
|
||||
|
|
|
@ -292,9 +292,7 @@ public class MapActivity extends AccessibleActivity implements
|
|||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
if ((wakeLock != null) || (keyguardLock != null)) {
|
||||
return;
|
||||
}
|
||||
|
||||
cancelNotification();
|
||||
//fixing bug with action bar appearing on android 2.3.3
|
||||
if (getSupportActionBar() != null){
|
||||
|
@ -334,8 +332,8 @@ public class MapActivity extends AccessibleActivity implements
|
|||
TargetPointsHelper targets = app.getTargetPointsHelper();
|
||||
RoutingHelper routingHelper = app.getRoutingHelper();
|
||||
if (routingHelper.isFollowingMode() && (
|
||||
!Algorithms.objectEquals(targets.getPointToNavigate(), routingHelper.getFinalLocation() )||
|
||||
!Algorithms.objectEquals(targets.getIntermediatePoints(), routingHelper.getIntermediatePoints())
|
||||
!Algorithms.objectEquals(targets.getPointToNavigate().point, routingHelper.getFinalLocation() )||
|
||||
!Algorithms.objectEquals(targets.getIntermediatePointsLatLon(), routingHelper.getIntermediatePoints())
|
||||
)) {
|
||||
targets.updateRouteAndReferesh(true);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue