FP5: gps/location: Update to LA.UM.9.14.1.r1-11900-QCM6490.QSSI14.0

Change-Id: I40672365d0e0d64a6081d427c417d9101af0748f
diff --git a/gps/android/2.1/AGnss.cpp b/gps/android/2.1/AGnss.cpp
index ce7b3aa..33a8fc3 100644
--- a/gps/android/2.1/AGnss.cpp
+++ b/gps/android/2.1/AGnss.cpp
@@ -51,9 +51,6 @@
     V2_0::IAGnssCallback::AGnssType  aType;
     IAGnssCallback::AGnssStatusValue aStatus;
 
-    // cache the AGps Type
-    mType = type;
-
     switch (type) {
     case LOC_AGPS_TYPE_SUPL:
         aType = IAGnssCallback::AGnssType::SUPL;
@@ -87,8 +84,13 @@
         return;
     }
 
-    if (mAGnssCbIface != nullptr) {
-        auto r = mAGnssCbIface->agnssStatusCb(aType, aStatus);
+    mMutex.lock();
+    // cache the AGps Type
+    mType = type;
+    auto aGnssCbIface = mAGnssCbIface;
+    mMutex.unlock();
+    if (aGnssCbIface != nullptr) {
+        auto r = aGnssCbIface->agnssStatusCb(aType, aStatus);
         if (!r.isOk()) {
             LOC_LOGw("Error invoking AGNSS status cb %s", r.description().c_str());
         }
@@ -106,7 +108,9 @@
     }
 
     // Save the interface
+    mMutex.lock();
     mAGnssCbIface = callback;
+    mMutex.unlock();
 
     AgpsCbInfo cbInfo = {};
     cbInfo.statusV4Cb = (void*)agnssStatusIpV4Cb;