question: public boolean update ( GoogleMap googleMap , ArrayList < Polyline > paths , TripStatistics tripStatistics , boolean reload ) { synchronized ( locations ) { boolean hasStartMarker = false ; int newLocations = pendingLocations . drainTo ( locations ) ; if ( trackPath . updateState ( tripStatistics ) || reload ) { googleMap . clear ( ) ; paths . clear ( ) ; trackPath . updatePath ( googleMap , paths , 0 , locations ) ; hasStartMarker = updateStartAndEndMarkers ( googleMap ) ; updateWaypoints ( googleMap ) ; } else { if ( newLocations != 0 ) { int numLocations = locations . size ( ) ; trackPath . updatePath ( googleMap , paths , numLocations - newLocations , locations ) ; } } return hasStartMarker ; } }
target:  Updates the track, start and end markers, and waypoints.