private boolean validSecondStep ( LegStep secondStep , RouteProgress routeProgress ) { return routeProgress . currentLegProgress ( ) . upComingStep ( ) != null && routeProgress . currentLegProgress ( ) . upComingStep ( ) . equals ( secondStep ) ; }
The second step of the new route is valid if it equals the current route upcoming step .