diff --git a/src/cheogram/java/com/cheogram/android/ConnectionService.java b/src/cheogram/java/com/cheogram/android/ConnectionService.java index ef0e64788..a0239960d 100644 --- a/src/cheogram/java/com/cheogram/android/ConnectionService.java +++ b/src/cheogram/java/com/cheogram/android/ConnectionService.java @@ -117,9 +117,9 @@ public class ConnectionService extends android.telecom.ConnectionService { PermissionManager permissionManager = PermissionManager.getInstance(this); permissionManager.setNotificationSettings( - new NotificationSettings.Builder() - .withMessage(R.string.microphone_permission_for_call) - .withSmallIcon(R.drawable.ic_notification).build() + new NotificationSettings.Builder() + .withMessage(R.string.microphone_permission_for_call) + .withSmallIcon(R.drawable.ic_notification).build() ); Set permissions = new HashSet<>(); @@ -166,8 +166,8 @@ public class ConnectionService extends android.telecom.ConnectionService { CheogramConnection connection = new CheogramConnection(account, with, null); connection.setSessionId(sessionId); connection.setAddress( - Uri.fromParts("tel", with.getLocal(), null), - TelecomManager.PRESENTATION_ALLOWED + Uri.fromParts("tel", with.getLocal(), null), + TelecomManager.PRESENTATION_ALLOWED ); connection.setRinging(); @@ -269,7 +269,9 @@ public class ConnectionService extends android.telecom.ConnectionService { public void onAnswer() { // For incoming calls, a connection update may not have been triggered before answering // so we have to acquire the rtp connection object here - this.rtpConnection = xmppConnectionService.getJingleConnectionManager().findJingleRtpConnection(account, with, sessionId); + this.rtpConnection = + xmppConnectionService.getJingleConnectionManager() + .findJingleRtpConnection(account, with, sessionId); rtpConnection.get().acceptCall(); } diff --git a/src/main/java/eu/siacs/conversations/services/NotificationService.java b/src/main/java/eu/siacs/conversations/services/NotificationService.java index 0fdba2675..2dd77ce91 100644 --- a/src/main/java/eu/siacs/conversations/services/NotificationService.java +++ b/src/main/java/eu/siacs/conversations/services/NotificationService.java @@ -444,14 +444,10 @@ public class NotificationService { PhoneAccountHandle handle = null; for (Contact contact : id.account.getRoster().getContacts()) { - if (!contact.getJid().getDomain().equals(id.with.getDomain())) { + if (!contact.getJid().getDomain().equals(id.with.getDomain())) continue; - } - - if (!contact.getPresences().anyIdentity("gateway", "pstn")) { + if (!contact.getPresences().anyIdentity("gateway", "pstn")) continue; - } - handle = contact.phoneAccountHandle(); break; }