Compare commits
2 commits
414a94cb2f
...
5e8d51db9f
Author | SHA1 | Date | |
---|---|---|---|
Peter Cai | 5e8d51db9f | ||
Peter Cai | faab2d5799 |
|
@ -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,9 +269,7 @@ 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();
|
||||
}
|
||||
|
|
|
@ -444,10 +444,14 @@ 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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue