From 51d5fcc97b3af90a67addf2bf270f15a28b42c5e Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Tue, 20 Apr 2010 20:45:01 +0200 Subject: [PATCH] IRCService: added hasConnection(serverId) && made stopForeground() public --- src/org/yaaic/irc/IRCService.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/org/yaaic/irc/IRCService.java b/src/org/yaaic/irc/IRCService.java index b778d95..4b8fab0 100644 --- a/src/org/yaaic/irc/IRCService.java +++ b/src/org/yaaic/irc/IRCService.java @@ -223,7 +223,7 @@ public class IRCService extends Service * This is a wrapper around the new stopForeground method, using the older * APIs if it is not available. */ - private void stopForegroundCompat(int id) + public void stopForegroundCompat(int id) { foreground = false; @@ -321,6 +321,16 @@ public class IRCService extends Service return connection; } + /** + * Does the service keep a connection object for this server? + * + * @return true if there's a connection object, false otherwise + */ + public boolean hasConnection(int serverId) + { + return connections.containsKey(serverId); + } + /** * Check status of service */