Made changes to GoogSensorMotion::QuerySensorEventsBetweenTimestamps function to have less calls to std::vector::push_back_slow_path

The function now pre-allocates the vectors event_timestamps,
motion_vector_x, motion_vector_y, motion_vector_z,
event_arrival_timestamps (with making calls to vector::reserve), in
order to avoid multiple calls to push_back_slow_path.

Bug: 231138713
Test: Profiling test done, and the function is no longer showing up
here: https://pprof.corp.google.com/?id=e0980f27db83f9cb0cba5b8ae5d3b73b&tab=flame&pivot=push_back_slow_path
Change-Id: I481771aa1db0fb4d145e91a305582a30d48e8e48
1 file changed
tree: 26a989181b92e9f3804d75b7278f86af5daf6609
  1. common/
  2. devices/
  3. .clang-format
  4. Android.bp
  5. METADATA
  6. OWNERS
  7. PREUPLOAD.cfg