mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 01:29:38 +02:00
Use new presence types.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@1794 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
e83cc69730
commit
642396a100
3 changed files with 11 additions and 12 deletions
|
@ -81,7 +81,7 @@ import java.awt.*;
|
|||
*/
|
||||
public class XMPPConnection {
|
||||
|
||||
private static final String NEWLINE = System.getProperty ("line.separator");
|
||||
private static final String NEWLINE = System.getProperty("line.separator");
|
||||
|
||||
/**
|
||||
* Value that indicates whether debugging is enabled. When enabled, a debug
|
||||
|
@ -272,7 +272,7 @@ public class XMPPConnection {
|
|||
// We're done with the collector, so explicitly cancel it.
|
||||
collector.cancel();
|
||||
// Set presence to online.
|
||||
packetWriter.sendPacket(new Presence(true));
|
||||
packetWriter.sendPacket(new Presence(Presence.Type.AVAILABLE));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -319,7 +319,7 @@ public class XMPPConnection {
|
|||
*/
|
||||
public void close() {
|
||||
// Set presence to offline.
|
||||
packetWriter.sendPacket(new Presence(false));
|
||||
packetWriter.sendPacket(new Presence(Presence.Type.UNAVAILABLE));
|
||||
packetWriter.shutdown();
|
||||
packetReader.shutdown();
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue