-
Notifications
You must be signed in to change notification settings - Fork 318
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
Always provide DirectionsRoute in NavigationActivity #980
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,10 +77,8 @@ public void updateRawLocation(@NonNull Location rawLocation) { | |
|
||
private void extractRouteFromOptions(NavigationViewOptions options) { | ||
DirectionsRoute route = options.directionsRoute(); | ||
if (route != null) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why remove null check? |
||
cacheRouteInformation(options, route); | ||
updateCurrentRoute(route); | ||
} | ||
cacheRouteInformation(options, route); | ||
updateCurrentRoute(route); | ||
} | ||
|
||
private void cacheRouteInformation(NavigationViewOptions options, DirectionsRoute route) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,7 +56,7 @@ public void onDestroy() { | |
@Override | ||
public void onStart() { | ||
requestAudioFocus(); | ||
instructionQueue.remove(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can just do |
||
instructionQueue.poll(); | ||
} | ||
|
||
@Override | ||
|
@@ -69,7 +69,7 @@ public void onError(boolean isMapboxPlayer) { | |
if (isMapboxPlayer) { | ||
androidSpeechPlayer.play(instructionQueue.peek().getAnnouncement()); | ||
} else { | ||
instructionQueue.remove(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here |
||
instructionQueue.poll(); | ||
} | ||
} | ||
|
||
|
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.
why remove null check?