-
Notifications
You must be signed in to change notification settings - Fork 320
Navigator: adapt start session, stop session, and restore session #7060
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| runIfNotDestroyed { | ||
| latestLegIndex = tripSession.getRouteProgress()?.currentLegProgress?.legIndex | ||
| tripSession.stop() | ||
| tripSession.stop(true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I understood from your discussion with @averkhaturau in the NN PR, it would only be true if we haven't arrived yet, right? If so, there's no such check here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea of the cancelled : bool parameter here is that routing session cancel is not a complete opposite to routing complete. E.g. User may finish the route but navigator will not detect it because the user parks on another side of the building / fence, etc. But actual session is successfully complete and the User shows it by pressing thumb up. From other side, session may be detected is finished by mistake, e.g. wrong map-matching, target point where is impossible to stop, etc., and the user will actually cancel the session.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
||
| fun start(withTripService: Boolean, withReplayEnabled: Boolean = false) | ||
| fun stop() | ||
| fun stop(canceled: Boolean) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You always invoke it with true...
|
Is there a way to test it in integration? Ideally in instrumentation tests, but at least manually. |
|
@dzinad regarding the |
the only place where we can check that is telemetry, which is part of another PR. We're good to move these changes as they do not affect the SDK logic or current telemetry |
Codecov Report
@@ Coverage Diff @@
## main #7060 +/- ##
============================================
- Coverage 73.63% 73.61% -0.02%
Complexity 5855 5855
============================================
Files 802 802
Lines 31419 31430 +11
Branches 3735 3735
============================================
+ Hits 23136 23138 +2
- Misses 6806 6815 +9
Partials 1477 1477
|
|
closing in favor #7145 |
Description
Navigator: adapt start session, stop session, and restore session