IRCService: added hasConnection(serverId) && made stopForeground() public

This commit is contained in:
Sebastian Kaspari 2010-04-20 20:45:01 +02:00
parent a73ab89618
commit 51d5fcc97b
1 changed files with 11 additions and 1 deletions

View File

@ -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
*/