summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu-Han Yang <yuhany@google.com>2023-03-23 20:52:08 +0000
committerCherrypicker Worker <android-build-cherrypicker-worker@system.gserviceaccount.com>2023-03-23 20:52:08 +0000
commit41c5b4efe3b2689a391ed9288bf6c0f68f515d66 (patch)
tree35070c6020077d4de9e3578b7cbf9ebb9df9ff78
parent2550e7a719ad0e67f968e4bfcabb2483f3216df4 (diff)
Throw away initial measurements before interval tests
Bug: 264597734 Test: atest VtsHalGnssTargetTest (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:dbab0de442246a78c42acf5ca7c4f7c94fd82651) Merged-In: I1064807adf3264f13c1ef6678df37cff350503c5 Change-Id: I1064807adf3264f13c1ef6678df37cff350503c5 NOTE FOR REVIEWERS - original patch and result patch are not identical. PLEASE REVIEW CAREFULLY. Diffs between the patches: 47,6 +447,7 @@ const int numMeasurementEvents, const int timeoutSeconds, std::vector<int>& deltasMs) { + callback->gnss_data_cbq_.reset(); // throw away the initial measurements if any int64_t lastElapsedRealtimeMillis = 0; for (int i = 0; i < numMeasurementEvents; i++) { GnssData lastGnssData; Original patch: From dbab0de442246a78c42acf5ca7c4f7c94fd82651 Mon Sep 17 00:00:00 2001 From: Yu-Han Yang <yuhany@google.com> Date: Tue, 07 Feb 2023 19:01:56 +0000 Subject: [PATCH] Throw away initial measurements before interval tests Bug: 264597734 Test: atest VtsHalGnssTargetTest Change-Id: I1064807adf3264f13c1ef6678df37cff350503c5 ---
-rw-r--r--gnss/aidl/vts/gnss_hal_test.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/gnss/aidl/vts/gnss_hal_test.cpp b/gnss/aidl/vts/gnss_hal_test.cpp
index 3907f57dc7..64e51c7d4a 100644
--- a/gnss/aidl/vts/gnss_hal_test.cpp
+++ b/gnss/aidl/vts/gnss_hal_test.cpp
@@ -447,6 +447,7 @@ void GnssHalTest::collectMeasurementIntervals(const sp<GnssMeasurementCallbackAi
const int numMeasurementEvents,
const int timeoutSeconds,
std::vector<int>& deltasMs) {
+ callback->gnss_data_cbq_.reset(); // throw away the initial measurements if any
int64_t lastElapsedRealtimeMillis = 0;
for (int i = 0; i < numMeasurementEvents; i++) {
GnssData lastGnssData;