diff options
author | crancocco <shulaibai@hustunique.com> | 2016-06-25 22:55:16 +0800 |
---|---|---|
committer | davidevinavil <davidevinavil@gmail.com> | 2017-01-21 18:26:28 +0100 |
commit | b80452111794b613819d5ad51e1690c4dd923e97 (patch) | |
tree | df2b4d14fdd89a40f6e11a24d93949e7bebfd8e5 /gps/core/ContextBase.cpp | |
parent | 8126cb8c09f99ae625364c98b1301d0c5390e27d (diff) |
z2_plus: Update GPS HAL from upstream
* Tag LA.HB.1.3.2-15400-8x96.0
Change-Id: I2ba108f26a2ef4fc78504ef8c08ca41624ccb193
Diffstat (limited to 'gps/core/ContextBase.cpp')
-rw-r--r-- | gps/core/ContextBase.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gps/core/ContextBase.cpp b/gps/core/ContextBase.cpp index 9f6c4aa..971354d 100644 --- a/gps/core/ContextBase.cpp +++ b/gps/core/ContextBase.cpp @@ -40,6 +40,27 @@ namespace loc_core { +loc_gps_cfg_s_type ContextBase::mGps_conf {0}; +loc_sap_cfg_s_type ContextBase::mSap_conf {0}; + +uint32_t ContextBase::getCarrierCapabilities() { + #define carrierMSA (uint32_t)0x2 + #define carrierMSB (uint32_t)0x1 + #define gpsConfMSA (uint32_t)0x4 + #define gpsConfMSB (uint32_t)0x2 + uint32_t capabilities = mGps_conf.CAPABILITIES; + if ((mGps_conf.SUPL_MODE & carrierMSA) != carrierMSA) { + capabilities &= ~gpsConfMSA; + } + if ((mGps_conf.SUPL_MODE & carrierMSB) != carrierMSB) { + capabilities &= ~gpsConfMSB; + } + + LOC_LOGV("getCarrierCapabilities: CAPABILITIES %x, SUPL_MODE %x, carrier capabilities %x", + mGps_conf.CAPABILITIES, mGps_conf.SUPL_MODE, capabilities); + return capabilities; +} + LBSProxyBase* ContextBase::getLBSProxy(const char* libName) { LBSProxyBase* proxy = NULL; |