Use known gateways in notification settings

(cherry picked from commit d7cde840a612538b2673091874b8af83948b98c0)
This commit is contained in:
Stephen Paul Weber 2024-09-15 00:02:08 -05:00 committed by Arne
parent 623824bfd5
commit c79651fc57

View file

@ -143,15 +143,7 @@ public class NotificationsSettingsFragment extends XmppPreferenceFragment {
boolean diallerIntegrationPossible = false;
if (Build.VERSION.SDK_INT >= 23) {
outer:
for (final var account : requireService().getAccounts()) {
for (final var contact : account.getRoster().getContacts()) {
if (contact.getPresences().anyIdentity("gateway", "pstn")) {
diallerIntegrationPossible = true;
break outer;
}
}
}
diallerIntegrationPossible = requireService().getAccounts().stream().anyMatch(a -> a.getGateways("pstn").size() > 0);
}
if (!diallerIntegrationPossible) {
final var pref = findPreference("dialler_integration_incoming");