Skip to content

Commit 3e34d13

Browse files
committed
GPS: Don't set XTRA download pending flag at boot time.
XTRA data downloads are now strictly on demand from the GPS engine. Also fix typo in handleDownloadXtraData() Change-Id: Ied1a6e2e62134add4d965326aae909c86f834682 Signed-off-by: Mike Lockwood <lockwood@android.com>
1 parent 12dbee8 commit 3e34d13

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

location/java/com/android/internal/location/GpsLocationProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ public class GpsLocationProvider implements LocationProviderInterface {
199199
// flags to trigger NTP or XTRA data download when network becomes available
200200
// initialized to true so we do NTP and XTRA when the network comes up after booting
201201
private boolean mInjectNtpTimePending = true;
202-
private boolean mDownloadXtraDataPending = true;
202+
private boolean mDownloadXtraDataPending = false;
203203

204204
// true if GPS is navigating
205205
private boolean mNavigating;
@@ -522,7 +522,7 @@ private void handleInjectNtpTime() {
522522
}
523523

524524
private void handleDownloadXtraData() {
525-
if (!mDownloadXtraDataPending) {
525+
if (!mNetworkAvailable) {
526526
// try again when network is up
527527
mDownloadXtraDataPending = true;
528528
return;

0 commit comments

Comments
 (0)