diff --git a/msm8998/android/Android.mk b/msm8998/android/Android.mk
index 142fdc8..4c6893a 100644
--- a/msm8998/android/Android.mk
+++ b/msm8998/android/Android.mk
@@ -22,8 +22,8 @@
     location_api/LocationUtil.cpp \
     location_api/GnssAPIClient.cpp \
     location_api/GeofenceAPIClient.cpp \
-    location_api/FlpAPIClient.cpp \
-    location_api/GnssMeasurementAPIClient.cpp \
+    location_api/BatchingAPIClient.cpp \
+    location_api/MeasurementAPIClient.cpp \
 
 LOCAL_C_INCLUDES:= \
     $(LOCAL_PATH)/location_api \
diff --git a/msm8998/android/GnssBatching.cpp b/msm8998/android/GnssBatching.cpp
index b79105c..6ffadc9 100644
--- a/msm8998/android/GnssBatching.cpp
+++ b/msm8998/android/GnssBatching.cpp
@@ -21,7 +21,7 @@
 #define LOG_TAG "LocSvc_GnssBatchingInterface"
 
 #include <log_util.h>
-#include <FlpAPIClient.h>
+#include <BatchingAPIClient.h>
 #include "GnssBatching.h"
 
 namespace android {
@@ -60,7 +60,7 @@
         mApi = nullptr;
     }
 
-    mApi = new FlpAPIClient(callback);
+    mApi = new BatchingAPIClient(callback);
     if (mApi == nullptr) {
         LOC_LOGE("%s]: failed to create mApi", __FUNCTION__);
         return false;
@@ -82,7 +82,7 @@
     if (mApi == nullptr) {
         LOC_LOGE("%s]: mApi is nullptr", __FUNCTION__);
     } else {
-        ret = mApi->flpGetBatchSize();
+        ret = mApi->getBatchSize();
     }
     return ret;
 }
@@ -92,7 +92,7 @@
     if (mApi == nullptr) {
         LOC_LOGE("%s]: mApi is nullptr", __FUNCTION__);
     } else {
-        ret = mApi->flpStartSession(options);
+        ret = mApi->startSession(options);
     }
     return ret;
 }
@@ -101,7 +101,7 @@
     if (mApi == nullptr) {
         LOC_LOGE("%s]: mApi is nullptr", __FUNCTION__);
     } else {
-        mApi->flpFlushBatchedLocations();
+        mApi->flushBatchedLocations();
     }
     return Void();
 }
@@ -111,7 +111,7 @@
     if (mApi == nullptr) {
         LOC_LOGE("%s]: mApi is nullptr", __FUNCTION__);
     } else {
-        ret = mApi->flpStopSession();
+        ret = mApi->stopSession();
     }
     return ret;
 }
diff --git a/msm8998/android/GnssBatching.h b/msm8998/android/GnssBatching.h
index b46fae8..de5d5c3 100644
--- a/msm8998/android/GnssBatching.h
+++ b/msm8998/android/GnssBatching.h
@@ -42,7 +42,7 @@
 using ::android::hardware::Void;
 using ::android::sp;
 
-class FlpAPIClient;
+class BatchingAPIClient;
 struct GnssBatching : public IGnssBatching {
     GnssBatching();
     ~GnssBatching();
@@ -68,7 +68,7 @@
  private:
     sp<GnssBatchingDeathRecipient> mGnssBatchingDeathRecipient = nullptr;
     sp<IGnssBatchingCallback> mGnssBatchingCbIface = nullptr;
-    FlpAPIClient* mApi = nullptr;
+    BatchingAPIClient* mApi = nullptr;
 };
 
 }  // namespace implementation
diff --git a/msm8998/android/GnssMeasurement.cpp b/msm8998/android/GnssMeasurement.cpp
index bc07265..8cbfabd 100644
--- a/msm8998/android/GnssMeasurement.cpp
+++ b/msm8998/android/GnssMeasurement.cpp
@@ -21,7 +21,7 @@
 #define LOG_TAG "LocSvc_GnssMeasurementInterface"
 
 #include <log_util.h>
-#include <GnssMeasurementAPIClient.h>
+#include <MeasurementAPIClient.h>
 #include "GnssMeasurement.h"
 
 namespace android {
@@ -41,7 +41,7 @@
 
 GnssMeasurement::GnssMeasurement() {
     mGnssMeasurementDeathRecipient = new GnssMeasurementDeathRecipient(this);
-    mApi = new GnssMeasurementAPIClient();
+    mApi = new MeasurementAPIClient();
 }
 
 GnssMeasurement::~GnssMeasurement() {
@@ -74,7 +74,7 @@
     mGnssMeasurementCbIface = callback;
     mGnssMeasurementCbIface->linkToDeath(mGnssMeasurementDeathRecipient, 0 /*cookie*/);
 
-    return mApi->gnssMeasurementSetCallback(callback);
+    return mApi->measurementSetCallback(callback);
 }
 
 Return<void> GnssMeasurement::close()  {
@@ -87,7 +87,7 @@
         mGnssMeasurementCbIface->unlinkToDeath(mGnssMeasurementDeathRecipient);
         mGnssMeasurementCbIface = nullptr;
     }
-    mApi->gnssMeasurementClose();
+    mApi->measurementClose();
 
     return Void();
 }
diff --git a/msm8998/android/GnssMeasurement.h b/msm8998/android/GnssMeasurement.h
index cd364c3..5073169 100644
--- a/msm8998/android/GnssMeasurement.h
+++ b/msm8998/android/GnssMeasurement.h
@@ -38,7 +38,7 @@
 using ::android::hardware::hidl_string;
 using ::android::sp;
 
-class GnssMeasurementAPIClient;
+class MeasurementAPIClient;
 struct GnssMeasurement : public IGnssMeasurement {
     GnssMeasurement();
     ~GnssMeasurement();
@@ -64,7 +64,7 @@
  private:
     sp<GnssMeasurementDeathRecipient> mGnssMeasurementDeathRecipient = nullptr;
     sp<IGnssMeasurementCallback> mGnssMeasurementCbIface = nullptr;
-    GnssMeasurementAPIClient* mApi;
+    MeasurementAPIClient* mApi;
 };
 
 }  // namespace implementation
diff --git a/msm8998/android/location_api/FlpAPIClient.cpp b/msm8998/android/location_api/BatchingAPIClient.cpp
similarity index 89%
rename from msm8998/android/location_api/FlpAPIClient.cpp
rename to msm8998/android/location_api/BatchingAPIClient.cpp
index f3af773..7325592 100644
--- a/msm8998/android/location_api/FlpAPIClient.cpp
+++ b/msm8998/android/location_api/BatchingAPIClient.cpp
@@ -28,13 +28,13 @@
  */
 
 #define LOG_NDDEBUG 0
-#define LOG_TAG "LocSvc_FlpAPIClient"
+#define LOG_TAG "LocSvc_BatchingAPIClient"
 
 #include <log_util.h>
 #include <loc_cfg.h>
 
 #include "LocationUtil.h"
-#include "FlpAPIClient.h"
+#include "BatchingAPIClient.h"
 
 namespace android {
 namespace hardware {
@@ -45,7 +45,7 @@
 static void convertBatchOption(const IGnssBatching::Options& in, LocationOptions& out,
         LocationCapabilitiesMask mask);
 
-FlpAPIClient::FlpAPIClient(const sp<IGnssBatchingCallback>& callback) :
+BatchingAPIClient::BatchingAPIClient(const sp<IGnssBatchingCallback>& callback) :
     LocationAPIClientBase(),
     mGnssBatchingCbIface(callback),
     mDefaultId(42),
@@ -74,18 +74,18 @@
     locAPISetCallbacks(locationCallbacks);
 }
 
-FlpAPIClient::~FlpAPIClient()
+BatchingAPIClient::~BatchingAPIClient()
 {
     LOC_LOGD("%s]: ()", __FUNCTION__);
 }
 
-int FlpAPIClient::flpGetBatchSize()
+int BatchingAPIClient::getBatchSize()
 {
     LOC_LOGD("%s]: ()", __FUNCTION__);
     return locAPIGetBatchSize();
 }
 
-int FlpAPIClient::flpStartSession(const IGnssBatching::Options& opts)
+int BatchingAPIClient::startSession(const IGnssBatching::Options& opts)
 {
     LOC_LOGD("%s]: (%lld %d)", __FUNCTION__,
             static_cast<long long>(opts.periodNanos), static_cast<uint8_t>(opts.flags));
@@ -102,7 +102,7 @@
     return retVal;
 }
 
-int FlpAPIClient::flpUpdateSessionOptions(const IGnssBatching::Options& opts)
+int BatchingAPIClient::updateSessionOptions(const IGnssBatching::Options& opts)
 {
     LOC_LOGD("%s]: (%lld %d)", __FUNCTION__,
             static_cast<long long>(opts.periodNanos), static_cast<uint8_t>(opts.flags));
@@ -120,7 +120,7 @@
     return retVal;
 }
 
-int FlpAPIClient::flpStopSession()
+int BatchingAPIClient::stopSession()
 {
     LOC_LOGD("%s]: ", __FUNCTION__);
     int retVal = -1;
@@ -130,25 +130,25 @@
     return retVal;
 }
 
-void FlpAPIClient::flpGetBatchedLocation(int last_n_locations)
+void BatchingAPIClient::getBatchedLocation(int last_n_locations)
 {
     LOC_LOGD("%s]: (%d)", __FUNCTION__, last_n_locations);
     locAPIGetBatchedLocations(last_n_locations);
 }
 
-void FlpAPIClient::flpFlushBatchedLocations()
+void BatchingAPIClient::flushBatchedLocations()
 {
     LOC_LOGD("%s]: ()", __FUNCTION__);
     locAPIGetBatchedLocations(SIZE_MAX);
 }
 
-void FlpAPIClient::onCapabilitiesCb(LocationCapabilitiesMask capabilitiesMask)
+void BatchingAPIClient::onCapabilitiesCb(LocationCapabilitiesMask capabilitiesMask)
 {
     LOC_LOGD("%s]: (%02x)", __FUNCTION__, capabilitiesMask);
     mLocationCapabilitiesMask = capabilitiesMask;
 }
 
-void FlpAPIClient::onBatchingCb(size_t count, Location* location)
+void BatchingAPIClient::onBatchingCb(size_t count, Location* location)
 {
     LOC_LOGD("%s]: (count: %zu)", __FUNCTION__, count);
     if (mGnssBatchingCbIface != nullptr && count > 0) {
diff --git a/msm8998/android/location_api/FlpAPIClient.h b/msm8998/android/location_api/BatchingAPIClient.h
similarity index 78%
rename from msm8998/android/location_api/FlpAPIClient.h
rename to msm8998/android/location_api/BatchingAPIClient.h
index 9fc7e19..da62a51 100644
--- a/msm8998/android/location_api/FlpAPIClient.h
+++ b/msm8998/android/location_api/BatchingAPIClient.h
@@ -27,8 +27,8 @@
  *
  */
 
-#ifndef FLP_API_CLINET_H
-#define FLP_API_CLINET_H
+#ifndef BATCHING_API_CLINET_H
+#define BATCHING_API_CLINET_H
 
 #include <android/hardware/gnss/1.0/IGnssBatching.h>
 #include <android/hardware/gnss/1.0/IGnssBatchingCallback.h>
@@ -36,7 +36,6 @@
 
 #include <LocationAPIClientBase.h>
 
-#define FLP_CONF_FILE "/vendor/etc/flp.conf"
 
 namespace android {
 namespace hardware {
@@ -44,19 +43,19 @@
 namespace V1_0 {
 namespace implementation {
 
-class FlpAPIClient : public LocationAPIClientBase
+class BatchingAPIClient : public LocationAPIClientBase
 {
 public:
-    FlpAPIClient(const sp<IGnssBatchingCallback>& callback);
-    ~FlpAPIClient();
-    int flpGetBatchSize();
-    int flpStartSession(const IGnssBatching::Options& options);
-    int flpUpdateSessionOptions(const IGnssBatching::Options& options);
-    int flpStopSession();
-    void flpGetBatchedLocation(int last_n_locations);
-    void flpFlushBatchedLocations();
+    BatchingAPIClient(const sp<IGnssBatchingCallback>& callback);
+    ~BatchingAPIClient();
+    int getBatchSize();
+    int startSession(const IGnssBatching::Options& options);
+    int updateSessionOptions(const IGnssBatching::Options& options);
+    int stopSession();
+    void getBatchedLocation(int last_n_locations);
+    void flushBatchedLocations();
 
-    inline LocationCapabilitiesMask flpGetCapabilities() { return mLocationCapabilitiesMask; }
+    inline LocationCapabilitiesMask getCapabilities() { return mLocationCapabilitiesMask; }
 
     // callbacks
     void onCapabilitiesCb(LocationCapabilitiesMask capabilitiesMask) final;
@@ -74,4 +73,4 @@
 }  // namespace gnss
 }  // namespace hardware
 }  // namespace android
-#endif // FLP_API_CLINET_H
+#endif // BATCHING_API_CLINET_H
diff --git a/msm8998/android/location_api/GnssMeasurementAPIClient.cpp b/msm8998/android/location_api/MeasurementAPIClient.cpp
similarity index 85%
rename from msm8998/android/location_api/GnssMeasurementAPIClient.cpp
rename to msm8998/android/location_api/MeasurementAPIClient.cpp
index 6e915b0..075ef69 100644
--- a/msm8998/android/location_api/GnssMeasurementAPIClient.cpp
+++ b/msm8998/android/location_api/MeasurementAPIClient.cpp
@@ -28,13 +28,13 @@
  */
 
 #define LOG_NDDEBUG 0
-#define LOG_TAG "LocSvc_GnssMeasurementAPIClient"
+#define LOG_TAG "LocSvc_MeasurementAPIClient"
 
 #include <log_util.h>
 #include <loc_cfg.h>
 
 #include "LocationUtil.h"
-#include "GnssMeasurementAPIClient.h"
+#include "MeasurementAPIClient.h"
 
 namespace android {
 namespace hardware {
@@ -48,32 +48,21 @@
         IGnssMeasurementCallback::GnssMeasurement& out);
 static void convertGnssClock(GnssMeasurementsClock& in, IGnssMeasurementCallback::GnssClock& out);
 
-GnssMeasurementAPIClient::GnssMeasurementAPIClient() :
+MeasurementAPIClient::MeasurementAPIClient() :
     mGnssMeasurementCbIface(nullptr),
-    mLocationCapabilitiesMask(0)
+    mTracking(false)
 {
     LOC_LOGD("%s]: ()", __FUNCTION__);
-    pthread_mutex_init(&mLock, nullptr);
-    pthread_cond_init (&mCond, nullptr);
-
-    // set default LocationOptions.
-    memset(&mLocationOptions, 0, sizeof(LocationOptions));
-    mLocationOptions.size = sizeof(LocationOptions);
-    mLocationOptions.minInterval = 1000;
-    mLocationOptions.minDistance = 0;
-    mLocationOptions.mode = GNSS_SUPL_MODE_STANDALONE;
 }
 
-GnssMeasurementAPIClient::~GnssMeasurementAPIClient()
+MeasurementAPIClient::~MeasurementAPIClient()
 {
     LOC_LOGD("%s]: ()", __FUNCTION__);
-    pthread_cond_destroy(&mCond);
-    pthread_mutex_destroy(&mLock);
 }
 
 // for GpsInterface
 Return<IGnssMeasurement::GnssMeasurementStatus>
-GnssMeasurementAPIClient::gnssMeasurementSetCallback(const sp<IGnssMeasurementCallback>& callback)
+MeasurementAPIClient::measurementSetCallback(const sp<IGnssMeasurementCallback>& callback)
 {
     LOC_LOGD("%s]: (%p)", __FUNCTION__, &callback);
 
@@ -100,50 +89,32 @@
     }
 
     locAPISetCallbacks(locationCallbacks);
-
-    while (!mLocationCapabilitiesMask) {
-        LOC_LOGD("%s]: wait for capabilities...", __FUNCTION__);
-        pthread_mutex_lock(&mLock);
-        pthread_cond_wait(&mCond, &mLock);
-        pthread_mutex_unlock(&mLock);
-    }
-    if (mLocationCapabilitiesMask & LOCATION_CAPABILITIES_GNSS_MSB_BIT)
-        mLocationOptions.mode = GNSS_SUPL_MODE_MSB;
-    else
-        mLocationOptions.mode = GNSS_SUPL_MODE_STANDALONE;
+    LocationOptions options;
+    memset(&options, 0, sizeof(LocationOptions));
+    options.size = sizeof(LocationOptions);
+    options.minInterval = 1000;
+    options.mode = GNSS_SUPL_MODE_STANDALONE;
+    mTracking = true;
     LOC_LOGD("%s]: start tracking session", __FUNCTION__);
-    locAPIStartTracking(mLocationOptions);
+    locAPIStartTracking(options);
 
     return IGnssMeasurement::GnssMeasurementStatus::SUCCESS;
 }
 
 // for GpsMeasurementInterface
-void GnssMeasurementAPIClient::gnssMeasurementClose() {
+void MeasurementAPIClient::measurementClose() {
     LOC_LOGD("%s]: ()", __FUNCTION__);
-    pthread_mutex_lock(&mLock);
-    mGnssMeasurementCbIface = nullptr;
-    pthread_mutex_unlock(&mLock);
+    mTracking = false;
     locAPIStopTracking();
 }
 
 // callbacks
-void GnssMeasurementAPIClient::onCapabilitiesCb(LocationCapabilitiesMask capabilitiesMask)
-{
-    LOC_LOGD("%s]: (%02x)", __FUNCTION__, capabilitiesMask);
-    mLocationCapabilitiesMask = capabilitiesMask;
-    pthread_mutex_lock(&mLock);
-    pthread_cond_signal(&mCond);
-    pthread_mutex_unlock(&mLock);
-}
-
-void GnssMeasurementAPIClient::onGnssMeasurementsCb(
+void MeasurementAPIClient::onGnssMeasurementsCb(
         GnssMeasurementsNotification gnssMeasurementsNotification)
 {
-    LOC_LOGD("%s]: (count: %zu)", __FUNCTION__, gnssMeasurementsNotification.count);
-    // we don't need to lock the mutext
-    // if mGnssMeasurementCbIface is set to nullptr
-    if (mGnssMeasurementCbIface != nullptr) {
-        pthread_mutex_lock(&mLock);
+    LOC_LOGD("%s]: (count: %zu active: %zu)",
+         __FUNCTION__, gnssMeasurementsNotification.count, mTracking);
+    if (mTracking) {
         if (mGnssMeasurementCbIface != nullptr) {
             IGnssMeasurementCallback::GnssData gnssData;
             convertGnssData(gnssMeasurementsNotification, gnssData);
@@ -153,7 +124,6 @@
                     __func__, r.description().c_str());
             }
         }
-        pthread_mutex_unlock(&mLock);
     }
 }
 
diff --git a/msm8998/android/location_api/GnssMeasurementAPIClient.h b/msm8998/android/location_api/MeasurementAPIClient.h
similarity index 76%
rename from msm8998/android/location_api/GnssMeasurementAPIClient.h
rename to msm8998/android/location_api/MeasurementAPIClient.h
index 02fe89a..422564d 100644
--- a/msm8998/android/location_api/GnssMeasurementAPIClient.h
+++ b/msm8998/android/location_api/MeasurementAPIClient.h
@@ -27,8 +27,8 @@
  *
  */
 
-#ifndef GNSS_MEASUREMENT_API_CLINET_H
-#define GNSS_MEASUREMENT_API_CLINET_H
+#ifndef MEASUREMENT_API_CLINET_H
+#define MEASUREMENT_API_CLINET_H
 
 
 #include <android/hardware/gnss/1.0/IGnssMeasurement.h>
@@ -45,32 +45,26 @@
 using ::android::hardware::gnss::V1_0::IGnssMeasurement;
 using ::android::sp;
 
-class GnssMeasurementAPIClient : public LocationAPIClientBase
+class MeasurementAPIClient : public LocationAPIClientBase
 {
 public:
-    GnssMeasurementAPIClient();
-    virtual ~GnssMeasurementAPIClient();
-    GnssMeasurementAPIClient(const GnssMeasurementAPIClient&) = delete;
-    GnssMeasurementAPIClient& operator=(const GnssMeasurementAPIClient&) = delete;
+    MeasurementAPIClient();
+    virtual ~MeasurementAPIClient();
+    MeasurementAPIClient(const MeasurementAPIClient&) = delete;
+    MeasurementAPIClient& operator=(const MeasurementAPIClient&) = delete;
 
     // for GpsMeasurementInterface
-    Return<IGnssMeasurement::GnssMeasurementStatus> gnssMeasurementSetCallback(
+    Return<IGnssMeasurement::GnssMeasurementStatus> measurementSetCallback(
             const sp<IGnssMeasurementCallback>& callback);
-    void gnssMeasurementClose();
+    void measurementClose();
 
     // callbacks we are interested in
-    void onCapabilitiesCb(LocationCapabilitiesMask capabilitiesMask) final;
     void onGnssMeasurementsCb(GnssMeasurementsNotification gnssMeasurementsNotification) final;
 
 private:
-    pthread_mutex_t mLock;
-    pthread_cond_t mCond;
-
     sp<IGnssMeasurementCallback> mGnssMeasurementCbIface;
 
-    LocationCapabilitiesMask mLocationCapabilitiesMask;
-
-    LocationOptions mLocationOptions;
+    bool mTracking;
 };
 
 }  // namespace implementation
@@ -78,4 +72,4 @@
 }  // namespace gnss
 }  // namespace hardware
 }  // namespace android
-#endif // GNSS_MEASUREMENT_API_CLINET_H
+#endif // MEASUREMENT_API_CLINET_H
diff --git a/msm8998/location/LocationAPIClientBase.cpp b/msm8998/location/LocationAPIClientBase.cpp
index 606a7b7..ea7f5a5 100644
--- a/msm8998/location/LocationAPIClientBase.cpp
+++ b/msm8998/location/LocationAPIClientBase.cpp
@@ -33,7 +33,7 @@
 #include <loc_cfg.h>
 #include "LocationAPIClientBase.h"
 
-#define FLP_CONF_FILE "/vendor/etc/flp.conf"
+#define BATCHING_CONF_FILE "/vendor/etc/flp.conf"
 #define GEOFENCE_SESSION_ID -1
 
 LocationAPIClientBase::LocationAPIClientBase() :
@@ -201,11 +201,11 @@
 int32_t LocationAPIClientBase::locAPIGetBatchSize()
 {
     if (mBatchSize == -1) {
-        const loc_param_s_type flp_conf_param_table[] =
+        const loc_param_s_type batching_conf_param_table[] =
         {
             {"BATCH_SIZE", &mBatchSize, nullptr, 'n'},
         };
-        UTIL_READ_CONF(FLP_CONF_FILE, flp_conf_param_table);
+        UTIL_READ_CONF(BATCHING_CONF_FILE, batching_conf_param_table);
         if (mBatchSize < 0) {
             // set mBatchSize to 0 if we got an illegal value from config file
             mBatchSize = 0;
diff --git a/sdm845/android/location_api/BatchingAPIClient.cpp b/sdm845/android/location_api/BatchingAPIClient.cpp
index ccb78b9..8ecfa55 100644
--- a/sdm845/android/location_api/BatchingAPIClient.cpp
+++ b/sdm845/android/location_api/BatchingAPIClient.cpp
@@ -32,6 +32,7 @@
 
 #include <log_util.h>
 #include <loc_cfg.h>
+#include <thread>
 
 #include "LocationUtil.h"
 #include "BatchingAPIClient.h"
@@ -90,12 +91,16 @@
 
 int BatchingAPIClient::getBatchSize()
 {
-    LOC_LOGD("%s]: ()", __FUNCTION__);
-    return locAPIGetBatchSize();
+    int batchSize = locAPIGetBatchSize();
+    LOC_LOGd("batchSize: %d", batchSize);
+    return batchSize;
 }
 
 int BatchingAPIClient::startSession(const IGnssBatching::Options& opts)
 {
+    mMutex.lock();
+    mState = STARTED;
+    mMutex.unlock();
     LOC_LOGD("%s]: (%lld %d)", __FUNCTION__,
             static_cast<long long>(opts.periodNanos), static_cast<uint8_t>(opts.flags));
     int retVal = -1;
@@ -131,8 +136,12 @@
 
 int BatchingAPIClient::stopSession()
 {
+    mMutex.lock();
+    mState = STOPPING;
+    mMutex.unlock();
     LOC_LOGD("%s]: ", __FUNCTION__);
     int retVal = -1;
+    locAPIGetBatchedLocations(mDefaultId, SIZE_MAX);
     if (locAPIStopSession(mDefaultId) == LOCATION_ERROR_SUCCESS) {
         retVal = 1;
     }
@@ -148,7 +157,13 @@
 void BatchingAPIClient::flushBatchedLocations()
 {
     LOC_LOGD("%s]: ()", __FUNCTION__);
-    locAPIGetBatchedLocations(mDefaultId, SIZE_MAX);
+    uint32_t retVal = locAPIGetBatchedLocations(mDefaultId, SIZE_MAX);
+    // when flush a stopped session or one doesn't exist, just report an empty batch.
+    if (LOCATION_ERROR_ID_UNKNOWN == retVal) {
+        BatchingOptions opt = {};
+        ::std::thread thd(&BatchingAPIClient::onBatchingCb, this, 0, nullptr, opt);
+        thd.detach();
+    }
 }
 
 void BatchingAPIClient::onCapabilitiesCb(LocationCapabilitiesMask capabilitiesMask)
@@ -159,19 +174,50 @@
 
 void BatchingAPIClient::onBatchingCb(size_t count, Location* location, BatchingOptions /*batchOptions*/)
 {
-    LOC_LOGD("%s]: (count: %zu)", __FUNCTION__, count);
-    if (mGnssBatchingCbIface != nullptr && count > 0) {
-        hidl_vec<GnssLocation> locationVec;
-        locationVec.resize(count);
-        for (size_t i = 0; i < count; i++) {
-            convertGnssLocation(location[i], locationVec[i]);
-        }
-        auto r = mGnssBatchingCbIface->gnssLocationBatchCb(locationVec);
-        if (!r.isOk()) {
-            LOC_LOGE("%s] Error from gnssLocationBatchCb description=%s",
-                __func__, r.description().c_str());
-        }
+    bool processReport = false;
+    LOC_LOGd("(count: %zu)", count);
+    mMutex.lock();
+    // back to back stop() and flush() could bring twice onBatchingCb(). Each one might come first.
+    // Combine them both (the first goes to cache, the second in location*) before report to FW
+    switch (mState) {
+        case STOPPING:
+            mState = STOPPED;
+            for (size_t i = 0; i < count; i++) {
+                mBatchedLocationInCache.push_back(location[i]);
+            }
+            break;
+        case STARTED:
+        case STOPPED: // flush() always trigger report, even on a stopped session
+            processReport = true;
+            break;
+        default:
+            break;
     }
+    // report location batch when in STARTED state or flush(), combined with cache in last stop()
+    if (processReport) {
+        auto gnssBatchingCbIface(mGnssBatchingCbIface);
+        size_t batchCacheCnt = mBatchedLocationInCache.size();
+        LOC_LOGd("(batchCacheCnt: %zu)", batchCacheCnt);
+        if (gnssBatchingCbIface != nullptr) {
+            hidl_vec<V1_0::GnssLocation> locationVec;
+            if (count+batchCacheCnt > 0) {
+                locationVec.resize(count+batchCacheCnt);
+                for (size_t i = 0; i < batchCacheCnt; ++i) {
+                    convertGnssLocation(mBatchedLocationInCache[i], locationVec[i]);
+                }
+                for (size_t i = 0; i < count; i++) {
+                    convertGnssLocation(location[i], locationVec[i+batchCacheCnt]);
+                }
+            }
+            auto r = gnssBatchingCbIface->gnssLocationBatchCb(locationVec);
+            if (!r.isOk()) {
+                LOC_LOGE("%s] Error from gnssLocationBatchCb 1.0 description=%s",
+                        __func__, r.description().c_str());
+            }
+        }
+        mBatchedLocationInCache.clear();
+    }
+    mMutex.unlock();
 }
 
 static void convertBatchOption(const IGnssBatching::Options& in, LocationOptions& out,
diff --git a/sdm845/android/location_api/BatchingAPIClient.h b/sdm845/android/location_api/BatchingAPIClient.h
index 64d47a0..93ccd16 100644
--- a/sdm845/android/location_api/BatchingAPIClient.h
+++ b/sdm845/android/location_api/BatchingAPIClient.h
@@ -33,7 +33,7 @@
 #include <android/hardware/gnss/1.0/IGnssBatching.h>
 #include <android/hardware/gnss/1.0/IGnssBatchingCallback.h>
 #include <pthread.h>
-
+#include <mutex>
 #include <LocationAPIClientBase.h>
 
 namespace android {
@@ -42,6 +42,8 @@
 namespace V1_1 {
 namespace implementation {
 
+enum BATCHING_STATE { STARTED, STOPPING, STOPPED };
+
 class BatchingAPIClient : public LocationAPIClientBase
 {
 public:
@@ -62,8 +64,12 @@
 
 private:
     sp<V1_0::IGnssBatchingCallback> mGnssBatchingCbIface;
+    std::mutex mMutex;
     uint32_t mDefaultId;
     LocationCapabilitiesMask mLocationCapabilitiesMask;
+    volatile BATCHING_STATE mState = STOPPED;
+
+    std::vector<Location> mBatchedLocationInCache;
 };
 
 }  // namespace implementation
diff --git a/sdm845/location/LocationAPIClientBase.cpp b/sdm845/location/LocationAPIClientBase.cpp
index 67e559b..f181798 100644
--- a/sdm845/location/LocationAPIClientBase.cpp
+++ b/sdm845/location/LocationAPIClientBase.cpp
@@ -613,7 +613,7 @@
             }
         }  else {
             retVal = LOCATION_ERROR_ID_UNKNOWN;
-            LOC_LOGE("%s:%d] invalid session: %d.", __FUNCTION__, __LINE__, id);
+            LOC_LOGd("unknown session id: %d, might flush() a stopped session",  id);
         }
     }
     pthread_mutex_unlock(&mMutex);
