diff options
author | Herbert von Broeuschmeul <Herbert.Broeuschmeul@gmail.com> | 2011-05-12 18:02:17 +0200 |
---|---|---|
committer | Herbert von Broeuschmeul <Herbert.Broeuschmeul@gmail.com> | 2012-10-10 03:24:15 +0200 |
commit | 56f4b61c61a2b5cd119cfc9ae2b9e8f1dee7f804 (patch) | |
tree | d5aa7a321e4fc0b0e3aebac1881f21a936cc8a02 | |
parent | 0f3f8565b8778e8c1d8fae9d33bc987a272a5911 (diff) | |
download | BlueGPS-56f4b61c61a2b5cd119cfc9ae2b9e8f1dee7f804.zip BlueGPS-56f4b61c61a2b5cd119cfc9ae2b9e8f1dee7f804.tar.gz BlueGPS-56f4b61c61a2b5cd119cfc9ae2b9e8f1dee7f804.tar.bz2 |
decrease delays between conncetions retries...
Should allow faster reconnection after temporary disconnection.
-rw-r--r-- | src/org/broeuschmeul/android/gps/bluetooth/provider/BlueetoothGpsManager.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/broeuschmeul/android/gps/bluetooth/provider/BlueetoothGpsManager.java b/src/org/broeuschmeul/android/gps/bluetooth/provider/BlueetoothGpsManager.java index d3e0bc3..22b12fb 100644 --- a/src/org/broeuschmeul/android/gps/bluetooth/provider/BlueetoothGpsManager.java +++ b/src/org/broeuschmeul/android/gps/bluetooth/provider/BlueetoothGpsManager.java @@ -129,7 +129,7 @@ public class BlueetoothGpsManager { try {
BufferedReader reader = new BufferedReader(new InputStreamReader(in,"US-ASCII"));
String s;
- while((enabled) && (now < lastRead+10000 )){
+ while((enabled) && (now < lastRead+5000 )){
if (reader.ready()){
s = reader.readLine();
Log.v(LOG_TAG, "data: "+System.currentTimeMillis()+" "+s);
@@ -401,7 +401,7 @@ public class BlueetoothGpsManager { connectionAndReadingPool = Executors.newSingleThreadScheduledExecutor();
Log.v(LOG_TAG, "starting connection to socket task");
this.retriesTimeout = SystemClock.uptimeMillis()+maxConnectionRetries*60000 ;
- connectionAndReadingPool.scheduleWithFixedDelay(connectThread, 3000, 10000, TimeUnit.MILLISECONDS);
+ connectionAndReadingPool.scheduleWithFixedDelay(connectThread, 3000, 5000, TimeUnit.MILLISECONDS);
// connectionAndReadingPool.scheduleWithFixedDelay(connectThread, 5000, 60000, TimeUnit.MILLISECONDS);
}
}
|