FP5: gps/location: Update to LA.UM.9.14.1.r1-11900-QCM6490.QSSI14.0
Change-Id: I40672365d0e0d64a6081d427c417d9101af0748f
diff --git a/gps/android/1.0/AGnss.cpp b/gps/android/1.0/AGnss.cpp
index 79f665c..64a44a8 100644
--- a/gps/android/1.0/AGnss.cpp
+++ b/gps/android/1.0/AGnss.cpp
@@ -83,8 +83,11 @@
}
st.ipV4Addr = status.ipV4Addr;
- if (mAGnssCbIface != nullptr) {
- auto r = mAGnssCbIface->agnssStatusIpV4Cb(st);
+ mMutex.lock();
+ auto aGnssCbIface = mAGnssCbIface;
+ mMutex.unlock();
+ if (aGnssCbIface != nullptr) {
+ auto r = aGnssCbIface->agnssStatusIpV4Cb(st);
if (!r.isOk()) {
LOC_LOGw("Error invoking AGNSS status cb %s", r.description().c_str());
}
@@ -101,7 +104,9 @@
}
// Save the interface
+ mMutex.lock();
mAGnssCbIface = callback;
+ mMutex.unlock();
AgpsCbInfo cbInfo = {};
cbInfo.statusV4Cb = (void*)agnssStatusIpV4Cb;