summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Hofbauer <alex@derhofbauer.at>2012-04-09 23:52:17 +0200
committerAlexander Hofbauer <alex@derhofbauer.at>2012-04-09 23:55:38 +0200
commitc05e3280a17d1c1283a6f460118b2bf53c134033 (patch)
tree7d76e94a0f092bfdcefb06ccc421943019eef224
parent13598000cefe59c5409a5bfb939cfd2c914a2d97 (diff)
downloadandroid_hardware_qcom_gps-gingerbread.tar.gz
android_hardware_qcom_gps-gingerbread.tar.bz2
android_hardware_qcom_gps-gingerbread.zip
Set supl_host_set flag in loc_eng_set_servergingerbread
Without this flag GPS mode is always set to GPS_POSITION_MODE_STANDALONE and fixes take ages to complete. Patch 13598000 assumes that supl_host_set or c2k_host_set are always set when there's corresponding configuration but this is actually only true in case loc_eng_set_server_proxy (which isn't called on the Legend) sets them. This patch fixes that. Change-Id: I47bca3566da2a0c4e1783a38a4b14a0b1c6de67d
-rwxr-xr-xloc_api/libloc_api/loc_eng.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/loc_api/libloc_api/loc_eng.cpp b/loc_api/libloc_api/loc_eng.cpp
index 1f3c33a..a9d2574 100755
--- a/loc_api/libloc_api/loc_eng.cpp
+++ b/loc_api/libloc_api/loc_eng.cpp
@@ -541,7 +541,7 @@ static int loc_eng_set_position_mode(GpsPositionMode mode, GpsPositionRecurrenc
fix_criteria_ptr->min_interval = min_interval;
fix_criteria_ptr->preferred_accuracy = 50;
- if (!(supl_host_set || c2k_host_set)) {
+ if (!(supl_host_set || c2k_host_set || loc_c2k_addr_is_set)) {
mode = GPS_POSITION_MODE_STANDALONE;
}
@@ -1844,6 +1844,7 @@ static int loc_eng_set_server(AGpsType type, const char* hostname, int port)
sizeof server_info_ptr->addr_info.rpc_loc_server_addr_u_type_u.url.addr);
LOC_LOGD ("loc_eng_set_server, addr = %s\n", server_info_ptr->addr_info.rpc_loc_server_addr_u_type_u.url.addr);
#endif /* #if (AMSS_VERSION==3200||AMSS_VERSION==20000) */
+ supl_host_set = 1;
break;
case AGPS_TYPE_C2K: