sm8450-common: gps: Update to LA.VENDOR.1.0.r1-21900-WAIPIO.0
Change-Id: Ib431364a902ecd9b068e672978f5e24ecbf42160
This commit is contained in:
@@ -349,12 +349,20 @@ LocationAPI::updateCallbacks(LocationCallbacks& locationCallbacks)
|
||||
|
||||
pthread_mutex_lock(&gDataMutex);
|
||||
|
||||
LocationCallbacks currentCallbacks = {};
|
||||
auto it = gData.clientData.find(this);
|
||||
if (it != gData.clientData.end()) {
|
||||
currentCallbacks = gData.clientData[this];
|
||||
}
|
||||
|
||||
if (isGnssClient(locationCallbacks)) {
|
||||
loadLibGnss();
|
||||
if (NULL != gData.gnssInterface) {
|
||||
// either adds new Client or updates existing Client
|
||||
gData.gnssInterface->addClient(this, locationCallbacks);
|
||||
}
|
||||
} else if (NULL != gData.gnssInterface && isGnssClient(currentCallbacks)) {
|
||||
gData.gnssInterface->removeClient(this, nullptr);
|
||||
}
|
||||
|
||||
if (isBatchingClient(locationCallbacks)) {
|
||||
@@ -363,6 +371,8 @@ LocationAPI::updateCallbacks(LocationCallbacks& locationCallbacks)
|
||||
// either adds new Client or updates existing Client
|
||||
gData.batchingInterface->addClient(this, locationCallbacks);
|
||||
}
|
||||
} else if (NULL != gData.batchingInterface && isBatchingClient(currentCallbacks)) {
|
||||
gData.batchingInterface->removeClient(this, nullptr);
|
||||
}
|
||||
|
||||
if (isGeofenceClient(locationCallbacks)) {
|
||||
@@ -371,6 +381,8 @@ LocationAPI::updateCallbacks(LocationCallbacks& locationCallbacks)
|
||||
// either adds new Client or updates existing Client
|
||||
gData.geofenceInterface->addClient(this, locationCallbacks);
|
||||
}
|
||||
} else if (NULL != gData.geofenceInterface && isGeofenceClient(currentCallbacks)) {
|
||||
gData.geofenceInterface->removeClient(this, nullptr);
|
||||
}
|
||||
|
||||
gData.clientData[this] = locationCallbacks;
|
||||
|
Reference in New Issue
Block a user