diff options
author | Mike Cailean <mcailean@codeaurora.org> | 2018-12-13 10:08:18 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2019-02-07 11:13:58 -0800 |
commit | dc0efb480067db854d27ef439c1fb598769ba361 (patch) | |
tree | b7d82b3aed9615d95e9abf4c16795e4b06c0dc5f /pla | |
parent | 9d6d95d09650ea9ada4771f00f1991b7a5f2cc91 (diff) | |
download | gps-dc0efb480067db854d27ef439c1fb598769ba361.tar.gz |
Enable support for External AP build
Enable support for build on External AP without
libcutils or any Android library support.
CRs-fixed: 2368435
Change-Id: I978127348fd6b8d90ed5ef0a714c02437dc59ee0
Diffstat (limited to 'pla')
-rw-r--r-- | pla/oe/loc_pla.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/pla/oe/loc_pla.h b/pla/oe/loc_pla.h index 9446888..e795a23 100644 --- a/pla/oe/loc_pla.h +++ b/pla/oe/loc_pla.h @@ -30,7 +30,10 @@ #define __LOC_PLA__ #ifdef __cplusplus +#ifndef FEATURE_EXTERNAL_AP #include <utils/SystemClock.h> +#endif /* FEATURE_EXTERNAL_AP */ +#include <inttypes.h> #include <sys/time.h> #include <time.h> @@ -47,10 +50,14 @@ inline int64_t uptimeMillis() extern "C" { #endif +#ifndef FEATURE_EXTERNAL_AP #include <cutils/properties.h> #include <cutils/threads.h> #include <cutils/sched_policy.h> +#endif /* FEATURE_EXTERNAL_AP */ +#include <pthread.h> #include <sys/time.h> +#include <sys/types.h> #include <string.h> #include <stdlib.h> #ifndef OFF_TARGET @@ -76,6 +83,16 @@ extern "C" { #define LOC_PATH_XTWIFI_CONF_STR "/etc/xtwifi.conf" #define LOC_PATH_QUIPC_CONF_STR "/etc/quipc.conf" +#ifdef FEATURE_EXTERNAL_AP +#define PROPERTY_VALUE_MAX 92 + +inline int property_get(const char* key, char* value, const char* default_value) +{ + strlcpy(value, default_value, PROPERTY_VALUE_MAX - 1); + return strlen(value); +} +#endif /* FEATURE_EXTERNAL_AP */ + #ifdef __cplusplus } #endif /*__cplusplus */ |