projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix key in AndroidManifest.xml.in
[fw/altos]
/
altoslib
/
AltosIdleMonitor.java
diff --git
a/altoslib/AltosIdleMonitor.java
b/altoslib/AltosIdleMonitor.java
index 74536204affee2471c2a83ca3c71faed585c8052..bcf20ef36fe767c940767a9ee9c20e4499785791 100644
(file)
--- a/
altoslib/AltosIdleMonitor.java
+++ b/
altoslib/AltosIdleMonitor.java
@@
-15,7
+15,7
@@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-package org.altusmetrum.altoslib_
7
;
+package org.altusmetrum.altoslib_
10
;
import java.io.*;
import java.util.concurrent.*;
import java.io.*;
import java.util.concurrent.*;
@@
-28,6
+28,7
@@
public class AltosIdleMonitor extends Thread {
AltosIdleFetch fetch;
boolean remote;
AltosIdleFetch fetch;
boolean remote;
+ boolean close_on_exit;
double frequency;
String callsign;
double frequency;
String callsign;
@@
-107,18
+108,25
@@
public class AltosIdleMonitor extends Thread {
}
} catch (InterruptedException ie) {
}
}
} catch (InterruptedException ie) {
}
- try {
- link.close();
- } catch (InterruptedException ie) {
+ if (close_on_exit) {
+ try {
+ link.close();
+ } catch (InterruptedException ie) {
+ }
}
}
}
}
- public AltosIdleMonitor(AltosIdleMonitorListener in_listener, AltosLink in_link, boolean in_remote)
- throws FileNotFoundException, InterruptedException, TimeoutException {
+ public AltosIdleMonitor(AltosIdleMonitorListener in_listener, AltosLink in_link, boolean in_remote, boolean in_close_on_exit) {
listener = in_listener;
link = in_link;
remote = in_remote;
listener = in_listener;
link = in_link;
remote = in_remote;
+ close_on_exit = in_close_on_exit;
listener_state = new AltosListenerState();
fetch = new AltosIdleFetch(link);
}
listener_state = new AltosListenerState();
fetch = new AltosIdleFetch(link);
}
+
+ public AltosIdleMonitor(AltosIdleMonitorListener in_listener, AltosLink in_link, boolean in_remote) {
+ this(in_listener, in_link, in_remote, true);
+ }
}
}
+