diff options
author | Mike Lockwood <lockwood@android.com> | 2010-08-17 07:42:54 -0400 |
---|---|---|
committer | Steve Kondik <shade@chemlab.org> | 2010-11-14 07:31:03 -0500 |
commit | 2d0ec35c7153cd4d5d97833a923fcf7e3880726a (patch) | |
tree | 8b9ae3df815b305ac050da8aa9b7de230a838934 /location | |
parent | 88606634d1fa0c6245f9b4c0c1bbe67842eab16f (diff) | |
download | frameworks_base-2d0ec35c7153cd4d5d97833a923fcf7e3880726a.zip frameworks_base-2d0ec35c7153cd4d5d97833a923fcf7e3880726a.tar.gz frameworks_base-2d0ec35c7153cd4d5d97833a923fcf7e3880726a.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')
-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 5022f70..8e7e5af 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 @@ -660,6 +663,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); } @@ -861,7 +865,7 @@ public class GpsLocationProvider implements LocationProviderInterface { return true; } if ("force_xtra_injection".equals(command)) { - if (native_supports_xtra()) { + if (mSupportsXtra) { xtraDownloadRequest(); return true; } @@ -1384,7 +1388,7 @@ public class GpsLocationProvider implements LocationProviderInterface { handleInjectNtpTime(); break; case DOWNLOAD_XTRA_DATA: - if (native_supports_xtra()) { + if (mSupportsXtra) { handleDownloadXtraData(); } break; |