Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b6ef8bad authored by Mike Lockwood's avatar Mike Lockwood Committed by Android (Google) Code Review
Browse files

Merge "GPS: Initialize XTRA support when GPS is enabled" into gingerbread

parents f1f48bc7 1a1cd3a8
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -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;