disconnet in background thread
This commit is contained in:
parent
e956c7b2a2
commit
be38b1e5f4
|
@ -722,8 +722,14 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
|
||||||
for (final Account account : accounts) {
|
for (final Account account : accounts) {
|
||||||
databaseBackend.writeRoster(account.getRoster());
|
databaseBackend.writeRoster(account.getRoster());
|
||||||
if (account.getXmppConnection() != null) {
|
if (account.getXmppConnection() != null) {
|
||||||
|
new Thread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
disconnect(account, false);
|
disconnect(account, false);
|
||||||
}
|
}
|
||||||
|
}).start();
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Context context = getApplicationContext();
|
Context context = getApplicationContext();
|
||||||
AlarmManager alarmManager = (AlarmManager) context
|
AlarmManager alarmManager = (AlarmManager) context
|
||||||
|
|
Loading…
Reference in New Issue