diff options
| author | 2017-08-01 14:31:23 +0000 | |
|---|---|---|
| committer | 2017-08-01 14:31:23 +0000 | |
| commit | 33676dddbdd37dc76c449e81ca8c5642f87a60c7 (patch) | |
| tree | 6598bdc61e6747e1ea47562b44a868d46158a84e | |
| parent | f18599a15b210c81232ec26462d70ec6a6f9fea0 (diff) | |
| parent | 45d68cb35bafa155eeae018be6706c92ca336e72 (diff) | |
Merge "power: gps: add gps read timeout" into cw-f-dev
| -rw-r--r-- | services/core/java/com/android/server/location/GpsXtraDownloader.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/location/GpsXtraDownloader.java b/services/core/java/com/android/server/location/GpsXtraDownloader.java index bf7798591c67..f4cf77fd53e1 100644 --- a/services/core/java/com/android/server/location/GpsXtraDownloader.java +++ b/services/core/java/com/android/server/location/GpsXtraDownloader.java @@ -44,6 +44,7 @@ public class GpsXtraDownloader { private static final long MAXIMUM_CONTENT_LENGTH_BYTES = 1000000; // 1MB. private static final String DEFAULT_USER_AGENT = "Android"; 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; // to load balance our server requests @@ -121,6 +122,7 @@ public class GpsXtraDownloader { "x-wap-profile", "http://www.openmobilealliance.org/tech/profiles/UAPROF/ccppschema-20021212#"); connection.setConnectTimeout(CONNECTION_TIMEOUT_MS); + connection.setReadTimeout(READ_TIMEOUT_MS); connection.connect(); int statusCode = connection.getResponseCode(); |