Status Update
Comments
sh...@google.com <sh...@google.com> #2
ja...@google.com <ja...@google.com> #3
Great! Thanks a lot, I'll look for the live updates soon!
ra...@googlemail.com <ra...@googlemail.com> #4
Initially I came across this as for some reasons we had a negative remaining seconds value somewhere. Then I saw that there is a property REMAINING_TIME_UNKNOWN that can be set in the travel estimate so I used that one instead if for some reason the time is wrong. According to travel estimate this is possible. So if the template can not deal with it, the travel estimate should not allow it either.
ja...@google.com <ja...@google.com> #5
I see. The TravelEstimate
object can take an unknown time in other places - see
sh...@google.com <sh...@google.com> #6
This might be a good candidate to slightly improve the documentation.
In TravelEstimate.Builder#setRemaningTime, we can document something like: "Note that REMAINING_TIME_UNKNOWN may not be supported depending on where the {@link TravelEstimate} is used. See the documentation of where this is used for any restrictions that might apply"
ra...@googlemail.com <ra...@googlemail.com> #7
Fine with me, guess that would help.
ap...@google.com <ap...@google.com> #8
Branch: androidx-main
commit b699061d27012a15895eaa257bda62fff77bf9fe
Author: Jay Yoo <jayyoo@google.com>
Date: Thu Mar 25 17:24:22 2021
Update `TravelEstimate` and `NavigationTemplate` javadoc on when an unknown time is not allowed
Relnote: Updated javadoc on when setting a `TravelEstimate`'s remaining time to an unknown time is allowed.
Test: n/a
Bug: 183632456
Change-Id: I9961081b996822fae8f8763abe578cb622a3d23d
M car/app/app/src/main/java/androidx/car/app/navigation/model/NavigationTemplate.java
M car/app/app/src/main/java/androidx/car/app/navigation/model/TravelEstimate.java
Description
Auto library version: "androidx.car.app:app:1.0.0-beta01"
When setting TravelEstimate.setReimingSeconds(TravelEstimate.REMAINING_TIME_UNKNOWN) and then calling NavigationTemplate.setDestinationTravelEstimate(travelEstimate) an Exeption is thrown:
The documentation of TravelEstimate.setRemainingTimeSeconds contains this:
If i manually set it to REMAINING_TIME_UNKNOWN i get the exception in NavigationTemplate.Builder.setDestinationTravelEstimate()
Which says:
This is not consistent!
BR Samuel