Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e7b8ac38 authored by Yu-Han Yang's avatar Yu-Han Yang
Browse files

Return an empty batch when there is no location to return

Bug: 205200767
Test: atest LocationManagerFineTest#testRequestFlush_Gnss
Change-Id: I98841f1e83e39289f0e09517d572041ecb058d07
parent 75eefcda
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -78,9 +78,6 @@ ndk::ScopedAStatus GnssBatching::start(int64_t periodNanos, int flags) {

ndk::ScopedAStatus GnssBatching::flush() {
    ALOGD("flush");
    if (mBatchedLocations.empty()) {
        return ndk::ScopedAStatus::ok();
    }
    std::vector<GnssLocation> copy = std::vector<GnssLocation>(mBatchedLocations);
    ndk::ScopedAStatus status;
    if (sCallback != nullptr) {