summaryrefslogtreecommitdiffstats
path: root/location
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2009-04-28 19:04:08 -0400
committerMike Lockwood <lockwood@android.com>2009-04-28 19:04:08 -0400
commitb8526bfe091d4a5948f6e3165357bb9bd4bfebbf (patch)
tree2d9dfc48912d45d7b1aaec0e7378484a8b94a21c /location
parentb8adcad61d9225ecdabde1a01b73455f484cbed7 (diff)
downloadframeworks_base-b8526bfe091d4a5948f6e3165357bb9bd4bfebbf.zip
frameworks_base-b8526bfe091d4a5948f6e3165357bb9bd4bfebbf.tar.gz
frameworks_base-b8526bfe091d4a5948f6e3165357bb9bd4bfebbf.tar.bz2
gps: Don't crash if no XTRA servers are specified.
Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'location')
-rw-r--r--location/java/com/android/internal/location/GpsXtraDownloader.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/location/java/com/android/internal/location/GpsXtraDownloader.java b/location/java/com/android/internal/location/GpsXtraDownloader.java
index b8545a6..2a8be57 100644
--- a/location/java/com/android/internal/location/GpsXtraDownloader.java
+++ b/location/java/com/android/internal/location/GpsXtraDownloader.java
@@ -70,11 +70,11 @@ public class GpsXtraDownloader {
if (server1 != null) mXtraServers[count++] = server1;
if (server2 != null) mXtraServers[count++] = server2;
if (server3 != null) mXtraServers[count++] = server3;
- }
-
- // randomize first server
- Random random = new Random();
- mNextServerIndex = random.nextInt(count);
+
+ // randomize first server
+ Random random = new Random();
+ mNextServerIndex = random.nextInt(count);
+ }
}
byte[] downloadXtraData() {