sm6150-common: gps: Update to LA.UM.9.1.r1-13000-SMxxx0.QSSI13.0
Change-Id: I51776c7c5db4e72c58f6dab73e8692a549ec37e8
This commit is contained in:
parent
92fe0b3663
commit
4c664b8c7e
@ -16,18 +16,6 @@ GNSS_CFLAGS = [
|
||||
"-Wno-error=date-time",
|
||||
]
|
||||
|
||||
/* Activate the following for regression testing */
|
||||
GNSS_SANITIZE = {
|
||||
/* address: true,*/
|
||||
cfi: true,
|
||||
misc_undefined: [
|
||||
"bounds",
|
||||
"null",
|
||||
"unreachable",
|
||||
"integer",
|
||||
],
|
||||
}
|
||||
|
||||
/* Activate the following for debug purposes only,
|
||||
comment out for production */
|
||||
GNSS_SANITIZE_DIAG = {
|
||||
|
@ -21,6 +21,6 @@ GNSS_CFLAGS := \
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
include $(call all-makefiles-under,$(LOCAL_PATH))
|
||||
|
||||
GNSS_SANITIZE := cfi bounds null unreachable integer
|
||||
GNSS_SANITIZE_DIAG := cfi bounds null unreachable integer address
|
||||
|
||||
endif # ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),)
|
||||
|
@ -2,7 +2,6 @@ LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := android.hardware.gnss@2.1-impl-qti
|
||||
LOCAL_SANITIZE += $(GNSS_SANITIZE)
|
||||
# activate the following line for debug purposes only, comment out for production
|
||||
#LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG)
|
||||
LOCAL_VENDOR_MODULE := true
|
||||
@ -74,7 +73,7 @@ include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := android.hardware.gnss@2.1-service-qti
|
||||
LOCAL_SANITIZE += $(GNSS_SANITIZE)
|
||||
|
||||
# activate the following line for debug purposes only, comment out for production
|
||||
#LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG)
|
||||
LOCAL_VINTF_FRAGMENTS := android.hardware.gnss@2.1-service-qti.xml
|
||||
|
@ -3,7 +3,7 @@ cc_library_static {
|
||||
name: "liblocbatterylistener",
|
||||
vendor: true,
|
||||
|
||||
sanitize: GNSS_SANITIZE,
|
||||
|
||||
|
||||
cflags: GNSS_CFLAGS + ["-DBATTERY_LISTENER_ENABLED"],
|
||||
local_include_dirs: ["."],
|
||||
|
@ -4,7 +4,7 @@ cc_library_shared {
|
||||
name: "libbatching",
|
||||
vendor: true,
|
||||
|
||||
sanitize: GNSS_SANITIZE,
|
||||
|
||||
|
||||
shared_libs: [
|
||||
"libutils",
|
||||
|
@ -4,7 +4,7 @@ cc_library_shared {
|
||||
name: "libloc_core",
|
||||
vendor: true,
|
||||
|
||||
sanitize: GNSS_SANITIZE,
|
||||
|
||||
|
||||
shared_libs: [
|
||||
"liblog",
|
||||
|
@ -1034,7 +1034,7 @@ bool ElapsedRealtimeEstimator::getCurrentTime(
|
||||
struct timespec sinceBootTime;
|
||||
struct timespec sinceBootTimeTest;
|
||||
bool clockGetTimeSuccess = false;
|
||||
const uint32_t MAX_TIME_DELTA_VALUE_NANOS = 10000;
|
||||
const uint32_t MAX_TIME_DELTA_VALUE_NANOS = 15000;
|
||||
const uint32_t MAX_GET_TIME_COUNT = 20;
|
||||
/* Attempt to get CLOCK_REALTIME and CLOCK_BOOTIME in succession without an interruption
|
||||
or context switch (for up to MAX_GET_TIME_COUNT times) to avoid errors in the calculation */
|
||||
|
@ -101,6 +101,7 @@ public:
|
||||
inline virtual void* getSibling2() { return NULL; }
|
||||
inline virtual double getGloRfLoss(uint32_t left,
|
||||
uint32_t center, uint32_t right, uint8_t gloFrequency) { return 0.0; }
|
||||
inline virtual float getGeoidalSeparation(double latitude, double longitude) { return 0.0; }
|
||||
};
|
||||
|
||||
class LocApiBase {
|
||||
|
@ -509,7 +509,7 @@ public:
|
||||
for (uint8_t i = 0; rtv && i < MAX_NETWORK_HANDLES; ++i) {
|
||||
rtv &= (mAllNetworkHandles[i] == peer.mAllNetworkHandles[i]);
|
||||
}
|
||||
return rtv & peer.mApn.compare(mApn);
|
||||
return rtv && !peer.mApn.compare(mApn);
|
||||
}
|
||||
inline virtual SystemStatusItemBase& collate(SystemStatusItemBase& curInfo) {
|
||||
LOC_LOGv("NetworkInfo: mAllTypes=%" PRIx64 " connected=%u mType=%x mApn=%s",
|
||||
|
@ -5,7 +5,7 @@ cc_library_shared {
|
||||
name: "libgeofencing",
|
||||
vendor: true,
|
||||
|
||||
sanitize: GNSS_SANITIZE,
|
||||
|
||||
|
||||
srcs: [
|
||||
"GeofenceAdapter.cpp",
|
||||
|
@ -590,7 +590,7 @@ void AgpsManager::requestATL(int connHandle, AGpsExtType agpsType,
|
||||
sm->setApnTypeMask(apnTypeMask);
|
||||
|
||||
/* Invoke AGPS SM processing */
|
||||
AgpsSubscriber subscriber(connHandle, false, false, apnTypeMask);
|
||||
AgpsSubscriber subscriber(connHandle, true, false, apnTypeMask);
|
||||
sm->setCurrentSubscriber(&subscriber);
|
||||
/* Send subscriber event */
|
||||
sm->processAgpsEvent(AGPS_EVENT_SUBSCRIBE);
|
||||
|
@ -5,7 +5,7 @@ cc_library_shared {
|
||||
name: "libgnss",
|
||||
vendor: true,
|
||||
|
||||
sanitize: GNSS_SANITIZE,
|
||||
|
||||
|
||||
shared_libs: [
|
||||
"libutils",
|
||||
|
@ -77,6 +77,8 @@ static void agpsCloseResultCb (bool isSuccess, AGpsExtType agpsType, void* userD
|
||||
|
||||
typedef const CdfwInterface* (*getCdfwInterface)();
|
||||
|
||||
typedef void getPdnTypeFromWds(const std::string& apnName, std::function<void(int)> pdnCb);
|
||||
|
||||
inline bool GnssReportLoggerUtil::isLogEnabled() {
|
||||
return (mLogLatency != nullptr);
|
||||
}
|
||||
@ -5220,6 +5222,38 @@ bool GnssAdapter::releaseATL(int connHandle){
|
||||
return true;
|
||||
}
|
||||
|
||||
void GnssAdapter::reportPdnTypeFromWds(int pdnType, AGpsExtType agpsType, std::string apnName,
|
||||
AGpsBearerType bearerType) {
|
||||
LOC_LOGd("pdnType from WDS QMI: %d, agpsType: %d, apnName: %s, bearerType: %d",
|
||||
pdnType, agpsType, apnName.c_str(), bearerType);
|
||||
|
||||
struct MsgReportAtlPdn : public LocMsg {
|
||||
GnssAdapter& mAdapter;
|
||||
int mPdnType;
|
||||
AgpsManager* mAgpsManager;
|
||||
AGpsExtType mAgpsType;
|
||||
string mApnName;
|
||||
AGpsBearerType mBearerType;
|
||||
|
||||
inline MsgReportAtlPdn(GnssAdapter& adapter, int pdnType,
|
||||
AgpsManager* agpsManager, AGpsExtType agpsType,
|
||||
const string& apnName, AGpsBearerType bearerType) :
|
||||
LocMsg(), mAgpsManager(agpsManager), mAgpsType(agpsType),
|
||||
mApnName(apnName), mBearerType(bearerType),
|
||||
mAdapter(adapter), mPdnType(pdnType) {}
|
||||
inline virtual void proc() const {
|
||||
mAgpsManager->reportAtlOpenSuccess(mAgpsType,
|
||||
const_cast<char*>(mApnName.c_str()),
|
||||
mApnName.length(), mPdnType<=0? mBearerType:mPdnType);
|
||||
}
|
||||
};
|
||||
|
||||
AGpsBearerType atlPdnType = (pdnType+1) & 3; // convert WDS QMI pdn type to AgpsBearerType
|
||||
sendMsg(new MsgReportAtlPdn(*this, atlPdnType, &mAgpsManager,
|
||||
agpsType, apnName, bearerType));
|
||||
}
|
||||
|
||||
|
||||
void GnssAdapter::dataConnOpenCommand(
|
||||
AGpsExtType agpsType,
|
||||
const char* apnName, int apnLen, AGpsBearerType bearerType){
|
||||
@ -5227,17 +5261,16 @@ void GnssAdapter::dataConnOpenCommand(
|
||||
LOC_LOGI("GnssAdapter::frameworkDataConnOpen");
|
||||
|
||||
struct AgpsMsgAtlOpenSuccess: public LocMsg {
|
||||
|
||||
GnssAdapter& mAdapter;
|
||||
AgpsManager* mAgpsManager;
|
||||
AGpsExtType mAgpsType;
|
||||
char* mApnName;
|
||||
int mApnLen;
|
||||
AGpsBearerType mBearerType;
|
||||
|
||||
inline AgpsMsgAtlOpenSuccess(AgpsManager* agpsManager, AGpsExtType agpsType,
|
||||
const char* apnName, int apnLen, AGpsBearerType bearerType) :
|
||||
inline AgpsMsgAtlOpenSuccess(GnssAdapter& adapter, AgpsManager* agpsManager,
|
||||
AGpsExtType agpsType, const char* apnName, int apnLen, AGpsBearerType bearerType) :
|
||||
LocMsg(), mAgpsManager(agpsManager), mAgpsType(agpsType), mApnName(
|
||||
new char[apnLen + 1]), mApnLen(apnLen), mBearerType(bearerType) {
|
||||
new char[apnLen + 1]), mBearerType(bearerType), mAdapter(adapter) {
|
||||
|
||||
LOC_LOGV("AgpsMsgAtlOpenSuccess");
|
||||
if (mApnName == nullptr) {
|
||||
@ -5255,9 +5288,27 @@ void GnssAdapter::dataConnOpenCommand(
|
||||
}
|
||||
|
||||
inline virtual void proc() const {
|
||||
LOC_LOGv("AgpsMsgAtlOpenSuccess::proc()");
|
||||
string apn(mApnName);
|
||||
//Use QMI WDS API to query IP Protocol from modem profile
|
||||
void* libHandle = nullptr;
|
||||
getPdnTypeFromWds* getPdnTypeFunc = (getPdnTypeFromWds*)dlGetSymFromLib(libHandle,
|
||||
#ifdef USE_GLIB
|
||||
"libloc_api_wds.so", "_Z10getPdnTypeRKNSt7__cxx1112basic_string"\
|
||||
"IcSt11char_traitsIcESaIcEEESt8functionIFviEE");
|
||||
#else
|
||||
"libloc_api_wds.so", "_Z10getPdnTypeRKNSt3__112basic_stringIcNS_11char_traits"\
|
||||
"IcEENS_9allocatorIcEEEENS_8functionIFviEEE");
|
||||
#endif
|
||||
|
||||
LOC_LOGV("AgpsMsgAtlOpenSuccess::proc()");
|
||||
mAgpsManager->reportAtlOpenSuccess(mAgpsType, mApnName, mApnLen, mBearerType);
|
||||
std::function<void(int)> wdsPdnTypeCb = std::bind(&GnssAdapter::reportPdnTypeFromWds,
|
||||
&mAdapter, std::placeholders::_1, mAgpsType, apn, mBearerType);
|
||||
if (getPdnTypeFunc != nullptr) {
|
||||
LOC_LOGv("dlGetSymFromLib success");
|
||||
(*getPdnTypeFunc)(apn, wdsPdnTypeCb);
|
||||
} else {
|
||||
mAgpsManager->reportAtlOpenSuccess(mAgpsType, mApnName, apn.length(), mBearerType);
|
||||
}
|
||||
}
|
||||
};
|
||||
// Added inital length checks for apnlen check to avoid security issues
|
||||
@ -5266,7 +5317,7 @@ void GnssAdapter::dataConnOpenCommand(
|
||||
LOC_LOGe("%s]: incorrect apnlen length or incorrect apnName", __func__);
|
||||
mAgpsManager.reportAtlClosed(agpsType);
|
||||
} else {
|
||||
sendMsg( new AgpsMsgAtlOpenSuccess(
|
||||
sendMsg( new AgpsMsgAtlOpenSuccess(*this,
|
||||
&mAgpsManager, agpsType, apnName, apnLen, bearerType));
|
||||
}
|
||||
}
|
||||
|
@ -321,7 +321,6 @@ protected:
|
||||
void logLatencyInfo();
|
||||
|
||||
public:
|
||||
|
||||
GnssAdapter();
|
||||
virtual inline ~GnssAdapter() { }
|
||||
|
||||
@ -527,6 +526,8 @@ public:
|
||||
(
|
||||
const std::unordered_map<LocationQwesFeatureType, bool> &featureMap
|
||||
);
|
||||
void reportPdnTypeFromWds(int pdnType, AGpsExtType agpsType, std::string apnName,
|
||||
AGpsBearerType bearerType);
|
||||
|
||||
/* ======== UTILITIES ================================================================= */
|
||||
bool needReportForGnssClient(const UlpLocation& ulpLocation,
|
||||
|
@ -4,7 +4,7 @@ cc_library_shared {
|
||||
name: "liblocation_api",
|
||||
vendor: true,
|
||||
|
||||
sanitize: GNSS_SANITIZE,
|
||||
|
||||
|
||||
shared_libs: [
|
||||
"libutils",
|
||||
|
@ -4,7 +4,7 @@ cc_library_shared {
|
||||
name: "libgps.utils",
|
||||
vendor: true,
|
||||
|
||||
sanitize: GNSS_SANITIZE,
|
||||
|
||||
|
||||
//# Libs
|
||||
shared_libs: [
|
||||
|
Loading…
Reference in New Issue
Block a user