fix route recalculation and screen update issue on MapActivity resume
This commit is contained in:
parent
3f4b37b047
commit
e01a98fa13
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>();
|
||||
|
|
|
@ -312,9 +312,7 @@ public class MapActivity extends AccessibleActivity implements
|
|||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
if (wakeLock != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
cancelNotification();
|
||||
//fixing bug with action bar appearing on android 2.3.3
|
||||
if (getSupportActionBar() != null){
|
||||
|
@ -356,8 +354,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