mirror of
https://github.com/moparisthebest/Yaaic
synced 2025-02-16 23:10:11 -05:00
IRCService: added hasConnection(serverId) && made stopForeground() public
This commit is contained in:
parent
a73ab89618
commit
51d5fcc97b
@ -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
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user