summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiafei Wen <jiafeiw@codeaurora.org>2015-01-20 14:42:26 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2015-02-13 12:03:37 -0800
commit9431a6cb336c2fa1733e6ad3aa4bc323455f1dbf (patch)
treefe024282dfe9645295ce2c04aa6b11a72ca4a488
parent119c7a6410af606b16a41a1a17617344c54282b3 (diff)
downloadgps-9431a6cb336c2fa1733e6ad3aa4bc323455f1dbf.tar.gz
Send GPS tracking fixes to FLP HAL
FLP HAL accepts GPS tracking fixes for tracking, so this change sends the tracking fixes to FLP HAL while flp tracking is undergoing. Also, this change adds batching options flags and batching succeed/failure definitions. CRs-fixed: 748687 Change-Id: I11a2ba337433d9a42c903d36fc980ee1a3983a1e
-rw-r--r--core/LocAdapterBase.cpp10
-rw-r--r--core/LocAdapterProxyBase.h5
-rw-r--r--core/gps_extended_c.h24
3 files changed, 37 insertions, 2 deletions
diff --git a/core/LocAdapterBase.cpp b/core/LocAdapterBase.cpp
index 23184df..b304653 100644
--- a/core/LocAdapterBase.cpp
+++ b/core/LocAdapterBase.cpp
@@ -69,8 +69,14 @@ void LocAdapterBase::
GpsLocationExtended &locationExtended,
void* locationExt,
enum loc_sess_status status,
- LocPosTechMask loc_technology_mask)
-DEFAULT_IMPL()
+ LocPosTechMask loc_technology_mask) {
+ if (mLocAdapterProxyBase == NULL ||
+ !mLocAdapterProxyBase->reportPosition(location,
+ status,
+ loc_technology_mask)) {
+ DEFAULT_IMPL()
+ }
+}
void LocAdapterBase::
reportSv(GpsSvStatus &svStatus,
diff --git a/core/LocAdapterProxyBase.h b/core/LocAdapterProxyBase.h
index df5a48b..f6c22af 100644
--- a/core/LocAdapterProxyBase.h
+++ b/core/LocAdapterProxyBase.h
@@ -57,6 +57,11 @@ protected:
public:
inline virtual void handleEngineUpEvent() {};
inline virtual void handleEngineDownEvent() {};
+ inline virtual bool reportPosition(UlpLocation &location,
+ enum loc_sess_status status,
+ LocPosTechMask loc_technology_mask) {
+ return false;
+ }
};
} // namespace loc_core
diff --git a/core/gps_extended_c.h b/core/gps_extended_c.h
index 8a4e340..ff66ef5 100644
--- a/core/gps_extended_c.h
+++ b/core/gps_extended_c.h
@@ -72,6 +72,30 @@ extern "C" {
#define AGPS_CERTIFICATE_MAX_LENGTH 2000
#define AGPS_CERTIFICATE_MAX_SLOTS 10
+/** Batching default ID for dummy batching session*/
+#define GPS_BATCHING_DEFAULT_ID 1
+
+/** This cap is used to decide the FLP session cache
+size on AP. If the BATCH_SIZE in flp.conf is less than
+GPS_AP_BATCHING_SIZE_CAP, FLP session cache size will
+be twice the BATCH_SIZE defined in flp.conf. Otherwise,
+FLP session cache size will be equal to the BATCH_SIZE.*/
+#define GPS_AP_BATCHING_SIZE_CAP 40
+
+#define GPS_BATCHING_OPERATION_SUCCEESS 1
+#define GPS_BATCHING_OPERATION_FAILURE 0
+
+/** GPS extended batching flags*/
+#define GPS_EXT_BATCHING_ON_FULL 0x0000001
+#define GPS_EXT_BATCHING_ON_FIX 0x0000002
+
+/** Reasons of GPS reports batched locations*/
+typedef enum loc_batching_reported_type {
+ LOC_BATCHING_ON_FULL_IND_REPORT,
+ LOC_BATCHING_ON_FIX_IND_REPORT,
+ LOC_BATCHING_ON_QUERY_REPORT
+}LocBatchingReportedType;
+
enum loc_registration_mask_status {
LOC_REGISTRATION_MASK_ENABLED,
LOC_REGISTRATION_MASK_DISABLED