Merge "Optimize VelocityTracker to run in linear time." into gingerbread