use of com.xabber.android.data.account.AccountManager in project xabber-android by redsolution.
the class ConnectionManager method connectAll.
public void connectAll() {
LogManager.i(LOG_TAG, "connectAll");
AccountManager accountManager = AccountManager.getInstance();
for (AccountJid account : accountManager.getEnabledAccounts()) {
ReconnectionManager.getInstance().requestReconnect(account);
}
}
use of com.xabber.android.data.account.AccountManager in project xabber-android by redsolution.
the class ConnectionManager method updateConnections.
/**
* Update connection state.
* <p/>
* Start connections in waiting states and stop invalidated connections.
*
* @param userRequest
*/
public void updateConnections(boolean userRequest) {
LogManager.i(this, "updateConnections");
AccountManager accountManager = AccountManager.getInstance();
for (String account : accountManager.getAccounts()) {
final ConnectionItem connectionItem = accountManager.getAccount(account);
if (connectionItem.updateConnection(userRequest)) {
AccountManager.getInstance().onAccountChanged(account);
}
}
}
use of com.xabber.android.data.account.AccountManager in project xabber-android by redsolution.
the class ConnectionManager method forceReconnect.
/**
* Disconnect and connect using new network.
*/
public void forceReconnect() {
LogManager.i(this, "forceReconnect");
AccountManager accountManager = AccountManager.getInstance();
for (String account : accountManager.getAccounts()) {
accountManager.getAccount(account).forceReconnect();
AccountManager.getInstance().onAccountChanged(account);
}
}
Aggregations