Remove all PhoneAccount when an Account is removed

This commit is contained in:
Stephen Paul Weber 2022-04-19 08:52:11 -05:00
parent af12ac91d0
commit 7671d5e42e
No known key found for this signature in database
GPG Key ID: D11C2911CE519CDE
1 changed files with 5 additions and 0 deletions

View File

@ -2468,6 +2468,11 @@ public class XmppConnectionService extends Service {
mNotificationService.clear(conversation);
}
}
new Thread(() -> {
for (final Contact contact : account.getRoster().getContacts()) {
contact.unregisterAsPhoneAccount(this);
}
}).start();
if (account.getXmppConnection() != null) {
new Thread(() -> disconnect(account, !connected)).start();
}