gps: launch GSS on bootup even if GPS is disabled
Move the launching of GSS from loc_init to get_gps_interface, since loc_init is only called by AFW when GPS is enabled. CRs-fixed: 399637 Change-Id: I7cf8500f6a345f3bef71f717c595ea734da2bff2
This commit is contained in:
parent
d3b220c611
commit
4d0a381848
1 changed files with 11 additions and 11 deletions
|
@ -270,6 +270,17 @@ extern "C" const GpsInterface* get_gps_interface()
|
||||||
if(gps_conf.CAPABILITIES & ULP_CAPABILITY) {
|
if(gps_conf.CAPABILITIES & ULP_CAPABILITY) {
|
||||||
loc_eng_ulp_inf = loc_eng_get_ulp_inf();
|
loc_eng_ulp_inf = loc_eng_get_ulp_inf();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (get_target_name() == TARGET_NAME_APQ8064_STANDALONE)
|
||||||
|
{
|
||||||
|
gps_conf.CAPABILITIES &= ~(GPS_CAPABILITY_MSA | GPS_CAPABILITY_MSB);
|
||||||
|
gss_fd = open("/dev/gss", O_RDONLY);
|
||||||
|
if (gss_fd < 0) {
|
||||||
|
LOC_LOGE("GSS open failed: %s\n", strerror(errno));
|
||||||
|
}
|
||||||
|
LOC_LOGD("GSS open success! CAPABILITIES %0x\n", gps_conf.CAPABILITIES);
|
||||||
|
}
|
||||||
|
|
||||||
return &sLocEngInterface;
|
return &sLocEngInterface;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -327,17 +338,6 @@ static int loc_init(GpsCallbacks* callbacks)
|
||||||
gps_loc_cb = callbacks->location_cb;
|
gps_loc_cb = callbacks->location_cb;
|
||||||
gps_sv_cb = callbacks->sv_status_cb;
|
gps_sv_cb = callbacks->sv_status_cb;
|
||||||
|
|
||||||
if (get_target_name() == TARGET_NAME_APQ8064_STANDALONE)
|
|
||||||
{
|
|
||||||
gps_conf.CAPABILITIES &= ~(GPS_CAPABILITY_MSA | GPS_CAPABILITY_MSB);
|
|
||||||
gss_fd = open("/dev/gss", O_RDONLY);
|
|
||||||
if (gss_fd < 0) {
|
|
||||||
LOC_LOGE("GSS open failed: %s\n", strerror(errno));
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
LOC_LOGD("GSS open success! CAPABILITIES %0x\n", gps_conf.CAPABILITIES);
|
|
||||||
}
|
|
||||||
|
|
||||||
int retVal = -1;
|
int retVal = -1;
|
||||||
if (loc_eng_ulp_inf == NULL)
|
if (loc_eng_ulp_inf == NULL)
|
||||||
retVal = loc_eng_init(loc_afw_data, &clientCallbacks, event,
|
retVal = loc_eng_init(loc_afw_data, &clientCallbacks, event,
|
||||||
|
|
Loading…
Reference in a new issue