diff options
author | Mike Lockwood <lockwood@android.com> | 2010-08-17 07:42:54 -0400 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2010-08-30 19:42:26 -0400 |
commit | b445946deaad61fc3acaf4760a135fb92d0547b0 (patch) | |
tree | 1df9bd63fd9856c36061b779007b0041ca0d4ff1 /location/java | |
parent | 3e34d135f7fca756d00ebdc50c55b4f12ef7a328 (diff) | |
download | frameworks_base-b445946deaad61fc3acaf4760a135fb92d0547b0.zip frameworks_base-b445946deaad61fc3acaf4760a135fb92d0547b0.tar.gz frameworks_base-b445946deaad61fc3acaf4760a135fb92d0547b0.tar.bz2 |
GPS: Initialize XTRA support when GPS is enabled
BUG: 2923148
Change-Id: If9a643e385c6c567b30f47d4caa35fa812a2ba43
Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'location/java')
-rwxr-xr-x | location/java/com/android/internal/location/GpsLocationProvider.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/location/java/com/android/internal/location/GpsLocationProvider.java b/location/java/com/android/internal/location/GpsLocationProvider.java index c3dddad..ab79147 100755 --- a/location/java/com/android/internal/location/GpsLocationProvider.java +++ b/location/java/com/android/internal/location/GpsLocationProvider.java @@ -216,6 +216,9 @@ public class GpsLocationProvider implements LocationProviderInterface { // true if we started navigation private boolean mStarted; + // 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 @@ -659,6 +662,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); } @@ -860,7 +864,7 @@ public class GpsLocationProvider implements LocationProviderInterface { return true; } if ("force_xtra_injection".equals(command)) { - if (native_supports_xtra()) { + if (mSupportsXtra) { xtraDownloadRequest(); return true; } @@ -1383,7 +1387,7 @@ public class GpsLocationProvider implements LocationProviderInterface { handleInjectNtpTime(); break; case DOWNLOAD_XTRA_DATA: - if (native_supports_xtra()) { + if (mSupportsXtra) { handleDownloadXtraData(); } break; |