AU_LINUX_ANDROID_KK.04.04.04.010.214 based on quic/aosp/kk

-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iEYEABECAAYFAlRGYwkACgkQoUgPZYCpAfF2rwCg5quG/L+pzo5R94uD/QSR1Xs6
 mpsAoIxxW/ftz0uMbp67UANrb7EQyVNY
 =eKHq
 -----END PGP SIGNATURE-----

Merge tag 'AU_LINUX_ANDROID_KK.04.04.04.010.214' into HEAD

AU_LINUX_ANDROID_KK.04.04.04.010.214 based on quic/aosp/kk

Change-Id: Ida51fa96a5a39fcb3bb2f2c6ab9be84a3ec44d41
This commit is contained in:
Zhoulu Luo 2014-10-22 12:57:59 -07:00
commit 629d80a82a
4 changed files with 18 additions and 5 deletions

View file

@ -958,8 +958,12 @@ SIDE EFFECTS
static int loc_xtra_inject_data(char* data, int length) static int loc_xtra_inject_data(char* data, int length)
{ {
ENTRY_LOG(); ENTRY_LOG();
int ret_val = loc_eng_xtra_inject_data(loc_afw_data, data, length); int ret_val = -1;
if( (data != NULL) && ((unsigned int)length <= XTRA_DATA_MAX_SIZE))
ret_val = loc_eng_xtra_inject_data(loc_afw_data, data, length);
else
LOC_LOGE("%s, Could not inject XTRA data. Buffer address: %p, length: %d",
__func__, data, length);
EXIT_LOG(%d, ret_val); EXIT_LOG(%d, ret_val);
return ret_val; return ret_val;
} }

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. /* Copyright (c) 2011,2014 The Linux Foundation. All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are * modification, are permitted provided that the following conditions are
@ -39,6 +39,8 @@ extern "C" {
#include <hardware/gps.h> #include <hardware/gps.h>
#include <gps_extended.h> #include <gps_extended.h>
#define XTRA_DATA_MAX_SIZE 100000 /*bytes*/
typedef void (*loc_location_cb_ext) (UlpLocation* location, void* locExt); typedef void (*loc_location_cb_ext) (UlpLocation* location, void* locExt);
typedef void (*loc_sv_status_cb_ext) (GpsSvStatus* sv_status, void* svExt); typedef void (*loc_sv_status_cb_ext) (GpsSvStatus* sv_status, void* svExt);
typedef void* (*loc_ext_parser)(void* data); typedef void* (*loc_ext_parser)(void* data);

View file

@ -46,6 +46,7 @@
#define MSM8930_ID_2 "116" #define MSM8930_ID_2 "116"
#define APQ8030_ID_1 "157" #define APQ8030_ID_1 "157"
#define APQ8074_ID_1 "184" #define APQ8074_ID_1 "184"
#define PDS_ID_1 "178"
#define LINE_LEN 100 #define LINE_LEN 100
#define STR_LIQUID "Liquid" #define STR_LIQUID "Liquid"
@ -206,8 +207,12 @@ unsigned int loc_get_target(void)
} else { } else {
read_a_line(id_dep, rd_id, LINE_LEN); read_a_line(id_dep, rd_id, LINE_LEN);
} }
if( !memcmp(rd_hw_platform, STR_MTP, LENGTH(STR_MTP)) ){
if( !memcmp(baseband, STR_APQ, LENGTH(STR_APQ)) ){ if( !memcmp(rd_id, PDS_ID_1, LENGTH(PDS_ID_1))
&& IS_STR_END(rd_id[LENGTH(PDS_ID_1)]) )
gTarget = TARGET_PDS;
}
else if( !memcmp(baseband, STR_APQ, LENGTH(STR_APQ)) ){
if( !memcmp(rd_id, MPQ8064_ID_1, LENGTH(MPQ8064_ID_1)) if( !memcmp(rd_id, MPQ8064_ID_1, LENGTH(MPQ8064_ID_1))
&& IS_STR_END(rd_id[LENGTH(MPQ8064_ID_1)]) ) && IS_STR_END(rd_id[LENGTH(MPQ8064_ID_1)]) )
gTarget = TARGET_MPQ; gTarget = TARGET_MPQ;

View file

@ -35,6 +35,7 @@
#define TARGET_MPQ TARGET_SET(GNSS_NONE,NO_SSC) #define TARGET_MPQ TARGET_SET(GNSS_NONE,NO_SSC)
#define TARGET_MSM_NO_SSC TARGET_SET(GNSS_MSM, NO_SSC) #define TARGET_MSM_NO_SSC TARGET_SET(GNSS_MSM, NO_SSC)
#define TARGET_QCA1530 TARGET_SET(GNSS_QCA1530, NO_SSC) #define TARGET_QCA1530 TARGET_SET(GNSS_QCA1530, NO_SSC)
#define TARGET_PDS TARGET_SET(GNSS_PDS, NO_SSC)
#define TARGET_UNKNOWN TARGET_SET(GNSS_UNKNOWN, NO_SSC) #define TARGET_UNKNOWN TARGET_SET(GNSS_UNKNOWN, NO_SSC)
#define getTargetGnssType(target) (target>>1) #define getTargetGnssType(target) (target>>1)
@ -60,6 +61,7 @@ typedef enum {
GNSS_GSS, GNSS_GSS,
GNSS_MDM, GNSS_MDM,
GNSS_QCA1530, GNSS_QCA1530,
GNSS_PDS,
GNSS_UNKNOWN GNSS_UNKNOWN
}GNSS_TARGET; }GNSS_TARGET;