gps: Don't crash if no XTRA servers are specified.

Signed-off-by: Mike Lockwood <lockwood@android.com>
This commit is contained in:
Mike Lockwood
2009-04-28 19:04:08 -04:00
parent b8adcad61d
commit b8526bfe09

View File

@@ -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() {