am b6ef8bad
: Merge "GPS: Initialize XTRA support when GPS is enabled" into gingerbread
Merge commit 'b6ef8bad8a48fdc28770cf34d0c9efefc7fdd815' into gingerbread-plus-aosp * commit 'b6ef8bad8a48fdc28770cf34d0c9efefc7fdd815': GPS: Initialize XTRA support when GPS is enabled
This commit is contained in:
@ -197,6 +197,9 @@ public class GpsLocationProvider implements LocationProviderInterface {
|
||||
// capabilities of the GPS engine
|
||||
private int mEngineCapabilities;
|
||||
|
||||
// true if XTRA is supported
|
||||
private boolean mSupportsXtra;
|
||||
|
||||
// for calculating time to first fix
|
||||
private long mFixRequestTime = 0;
|
||||
// time to first fix for most recent session
|
||||
@ -635,6 +638,7 @@ public class GpsLocationProvider implements LocationProviderInterface {
|
||||
mEnabled = native_init();
|
||||
|
||||
if (mEnabled) {
|
||||
mSupportsXtra = native_supports_xtra();
|
||||
if (mSuplServerHost != null) {
|
||||
native_set_agps_server(AGPS_TYPE_SUPL, mSuplServerHost, mSuplServerPort);
|
||||
}
|
||||
@ -839,7 +843,7 @@ public class GpsLocationProvider implements LocationProviderInterface {
|
||||
sendMessage(INJECT_NTP_TIME, 0, null);
|
||||
result = true;
|
||||
} else if ("force_xtra_injection".equals(command)) {
|
||||
if (native_supports_xtra()) {
|
||||
if (mSupportsXtra) {
|
||||
xtraDownloadRequest();
|
||||
result = true;
|
||||
}
|
||||
@ -1372,7 +1376,7 @@ public class GpsLocationProvider implements LocationProviderInterface {
|
||||
handleInjectNtpTime();
|
||||
break;
|
||||
case DOWNLOAD_XTRA_DATA:
|
||||
if (native_supports_xtra()) {
|
||||
if (mSupportsXtra) {
|
||||
handleDownloadXtraData();
|
||||
}
|
||||
break;
|
||||
|
Reference in New Issue
Block a user