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
|
// capabilities of the GPS engine
|
||||||
private int mEngineCapabilities;
|
private int mEngineCapabilities;
|
||||||
|
|
||||||
|
// true if XTRA is supported
|
||||||
|
private boolean mSupportsXtra;
|
||||||
|
|
||||||
// for calculating time to first fix
|
// for calculating time to first fix
|
||||||
private long mFixRequestTime = 0;
|
private long mFixRequestTime = 0;
|
||||||
// time to first fix for most recent session
|
// time to first fix for most recent session
|
||||||
@ -635,6 +638,7 @@ public class GpsLocationProvider implements LocationProviderInterface {
|
|||||||
mEnabled = native_init();
|
mEnabled = native_init();
|
||||||
|
|
||||||
if (mEnabled) {
|
if (mEnabled) {
|
||||||
|
mSupportsXtra = native_supports_xtra();
|
||||||
if (mSuplServerHost != null) {
|
if (mSuplServerHost != null) {
|
||||||
native_set_agps_server(AGPS_TYPE_SUPL, mSuplServerHost, mSuplServerPort);
|
native_set_agps_server(AGPS_TYPE_SUPL, mSuplServerHost, mSuplServerPort);
|
||||||
}
|
}
|
||||||
@ -839,7 +843,7 @@ public class GpsLocationProvider implements LocationProviderInterface {
|
|||||||
sendMessage(INJECT_NTP_TIME, 0, null);
|
sendMessage(INJECT_NTP_TIME, 0, null);
|
||||||
result = true;
|
result = true;
|
||||||
} else if ("force_xtra_injection".equals(command)) {
|
} else if ("force_xtra_injection".equals(command)) {
|
||||||
if (native_supports_xtra()) {
|
if (mSupportsXtra) {
|
||||||
xtraDownloadRequest();
|
xtraDownloadRequest();
|
||||||
result = true;
|
result = true;
|
||||||
}
|
}
|
||||||
@ -1372,7 +1376,7 @@ public class GpsLocationProvider implements LocationProviderInterface {
|
|||||||
handleInjectNtpTime();
|
handleInjectNtpTime();
|
||||||
break;
|
break;
|
||||||
case DOWNLOAD_XTRA_DATA:
|
case DOWNLOAD_XTRA_DATA:
|
||||||
if (native_supports_xtra()) {
|
if (mSupportsXtra) {
|
||||||
handleDownloadXtraData();
|
handleDownloadXtraData();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user