use of eu.siacs.conversations.ui.interfaces.OnBackendConnected in project Conversations by siacs.
the class StartConversationActivity method onBackendConnected.
@Override
protected void onBackendConnected() {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M || checkSelfPermission(Manifest.permission.READ_CONTACTS) == PackageManager.PERMISSION_GRANTED) {
xmppConnectionService.getQuickConversationsService().considerSyncBackground(false);
}
if (mPostponedActivityResult != null) {
onActivityResult(mPostponedActivityResult.first, RESULT_OK, mPostponedActivityResult.second);
this.mPostponedActivityResult = null;
}
this.mActivatedAccounts.clear();
this.mActivatedAccounts.addAll(AccountUtils.getEnabledAccounts(xmppConnectionService));
configureHomeButton();
Intent intent = pendingViewIntent.pop();
if (intent != null && processViewIntent(intent)) {
filter(null);
} else {
if (mSearchEditText != null) {
filter(mSearchEditText.getText().toString());
} else {
filter(null);
}
}
Fragment fragment = getSupportFragmentManager().findFragmentByTag(FRAGMENT_TAG_DIALOG);
if (fragment instanceof OnBackendConnected) {
Log.d(Config.LOGTAG, "calling on backend connected on dialog");
((OnBackendConnected) fragment).onBackendConnected();
}
if (QuickConversationsService.isQuicksy()) {
setRefreshing(xmppConnectionService.getQuickConversationsService().isSynchronizing());
}
if (QuickConversationsService.isConversations() && AccountUtils.hasEnabledAccounts(xmppConnectionService) && this.contacts.size() == 0 && this.conferences.size() == 0 && mOpenedFab.compareAndSet(false, true)) {
binding.speedDial.open();
}
}
use of eu.siacs.conversations.ui.interfaces.OnBackendConnected in project Conversations by siacs.
the class ChooseContactActivity method onBackendConnected.
@Override
void onBackendConnected() {
filterContacts();
this.mActivatedAccounts.clear();
for (Account account : xmppConnectionService.getAccounts()) {
if (account.getStatus() != Account.State.DISABLED) {
if (Config.DOMAIN_LOCK != null) {
this.mActivatedAccounts.add(account.getJid().getEscapedLocal());
} else {
this.mActivatedAccounts.add(account.getJid().asBareJid().toEscapedString());
}
}
}
ActivityResult activityResult = this.postponedActivityResult.pop();
if (activityResult != null) {
handleActivityResult(activityResult);
}
final Fragment fragment = getSupportFragmentManager().findFragmentByTag(FRAGMENT_TAG_DIALOG);
if (fragment instanceof OnBackendConnected) {
((OnBackendConnected) fragment).onBackendConnected();
}
}
use of eu.siacs.conversations.ui.interfaces.OnBackendConnected in project Conversations by siacs.
the class BlocklistActivity method onBackendConnected.
@Override
public void onBackendConnected() {
for (final Account account : xmppConnectionService.getAccounts()) {
if (account.getJid().toEscapedString().equals(getIntent().getStringExtra(EXTRA_ACCOUNT))) {
this.account = account;
break;
}
}
filterContacts();
Fragment fragment = getSupportFragmentManager().findFragmentByTag(FRAGMENT_TAG_DIALOG);
if (fragment instanceof OnBackendConnected) {
((OnBackendConnected) fragment).onBackendConnected();
}
}
Aggregations