fixed another npe
This commit is contained in:
parent
c40c8ee910
commit
9b0bf9b5bc
|
@ -177,13 +177,16 @@ public class XmppConnectionService extends Service {
|
||||||
reconnectAccount(account, true);
|
reconnectAccount(account, true);
|
||||||
} else if ((account.getStatus() != Account.STATUS_CONNECTING)
|
} else if ((account.getStatus() != Account.STATUS_CONNECTING)
|
||||||
&& (account.getStatus() != Account.STATUS_NO_INTERNET)) {
|
&& (account.getStatus() != Account.STATUS_NO_INTERNET)) {
|
||||||
int next = account.getXmppConnection().getTimeToNextAttempt();
|
XmppConnection connection = account.getXmppConnection();
|
||||||
Log.d(LOGTAG, account.getJid()
|
if (connection!=null) {
|
||||||
+ ": error connecting account. try again in " + next
|
int next = connection.getTimeToNextAttempt();
|
||||||
+ "s for the "
|
Log.d(LOGTAG, account.getJid()
|
||||||
+ (account.getXmppConnection().getAttempt() + 1)
|
+ ": error connecting account. try again in " + next
|
||||||
+ " time");
|
+ "s for the "
|
||||||
scheduleWakeupCall((int) (next * 1.2), false);
|
+ (connection.getAttempt() + 1)
|
||||||
|
+ " time");
|
||||||
|
scheduleWakeupCall((int) (next * 1.2), false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
UIHelper.showErrorNotification(getApplicationContext(),
|
UIHelper.showErrorNotification(getApplicationContext(),
|
||||||
getAccounts());
|
getAccounts());
|
||||||
|
|
Loading…
Reference in New Issue