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

Commit cd688055 authored by Maggie Lee's avatar Maggie Lee Committed by android-build-merger
Browse files

Merge "power: gps: add gps read timeout" into cw-f-dev am: 33676ddd am: b5da08a2

am: d88f4b72

Change-Id: I63d677df2353fff2d2e786e25b0dc416837f1581
parents 52231062 d88f4b72
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -41,6 +41,7 @@ public class GpsXtraDownloader {
    private static final long MAXIMUM_CONTENT_LENGTH_BYTES = 1000000;  // 1MB.
    private static final long MAXIMUM_CONTENT_LENGTH_BYTES = 1000000;  // 1MB.
    private static final String DEFAULT_USER_AGENT = "Android";
    private static final String DEFAULT_USER_AGENT = "Android";
    private static final int CONNECTION_TIMEOUT_MS = (int) TimeUnit.SECONDS.toMillis(30);
    private static final int CONNECTION_TIMEOUT_MS = (int) TimeUnit.SECONDS.toMillis(30);
    private static final int READ_TIMEOUT_MS = (int) TimeUnit.SECONDS.toMillis(60);


    private final String[] mXtraServers;
    private final String[] mXtraServers;
    // to load balance our server requests
    // to load balance our server requests
@@ -123,6 +124,7 @@ public class GpsXtraDownloader {
                    "x-wap-profile",
                    "x-wap-profile",
                    "http://www.openmobilealliance.org/tech/profiles/UAPROF/ccppschema-20021212#");
                    "http://www.openmobilealliance.org/tech/profiles/UAPROF/ccppschema-20021212#");
            connection.setConnectTimeout(CONNECTION_TIMEOUT_MS);
            connection.setConnectTimeout(CONNECTION_TIMEOUT_MS);
            connection.setReadTimeout(READ_TIMEOUT_MS);


            connection.connect();
            connection.connect();
            int statusCode = connection.getResponseCode();
            int statusCode = connection.getResponseCode();