| 144 | } |
| 145 | |
| 146 | void RoutingSession::RebuildRouteOnTrafficUpdate() |
| 147 | { |
| 148 | CHECK_THREAD_CHECKER(m_threadChecker, ()); |
| 149 | m2::PointD startPoint; |
| 150 | |
| 151 | { |
| 152 | startPoint = m_lastGoodPosition; |
| 153 | |
| 154 | switch (m_state) |
| 155 | { |
| 156 | case SessionState::NoValidRoute: |
| 157 | case SessionState::RouteFinished: return; |
| 158 | |
| 159 | case SessionState::RouteBuilding: |
| 160 | case SessionState::RouteNotStarted: |
| 161 | case SessionState::RouteNoFollowing: |
| 162 | case SessionState::RouteRebuilding: startPoint = m_checkpoints.GetPointFrom(); break; |
| 163 | |
| 164 | case SessionState::OnRoute: |
| 165 | case SessionState::RouteNeedsRebuild: break; |
| 166 | } |
| 167 | |
| 168 | // Cancel current route building. |
| 169 | m_router->ClearState(); |
| 170 | } |
| 171 | |
| 172 | RebuildRoute(startPoint, m_rebuildReadyCallback, nullptr /* needMoreMapsCallback */, |
| 173 | nullptr /* removeRouteCallback */, RouterDelegate::kNoTimeout, SessionState::RouteRebuilding, |
| 174 | false /* adjustToPrevRoute */); |
| 175 | } |
| 176 | |
| 177 | bool RoutingSession::IsActive() const |
| 178 | { |
nothing calls this directly
no test coverage detected