}
// Wait for login
- while (!this.client.ready) {
+ while (this.client.state == Client.State.SETUP) {
Message msg = this.client.recv();
if (msg == null)
break;
}
// Notify connection status
- if (this.client.ready) {
+ if (this.client.state == Client.State.READY) {
this.command(CONNECT, null);
this.notify("Connected", android.R.drawable.presence_online);
} else {
}
// Process messages
- while (this.client.ready) {
+ while (this.client.state == Client.State.READY) {
Message msg = this.client.recv();
if (msg == null)
break;