Set display name to that of contact (not self) for incoming call

Stephen Paul Weber created

Change summary

src/cheogram/java/com/cheogram/android/ConnectionService.java | 4 ++++
1 file changed, 4 insertions(+)

Detailed changes

src/cheogram/java/com/cheogram/android/ConnectionService.java 🔗

@@ -190,6 +190,10 @@ public class ConnectionService extends android.telecom.ConnectionService {
 			Uri.fromParts("tel", with.getLocal(), null),
 			TelecomManager.PRESENTATION_ALLOWED
 		);
+		connection.setCallerDisplayName(
+			account.getRoster().getContact(with).getDisplayName(),
+			TelecomManager.PRESENTATION_ALLOWED
+		);
 		connection.setRinging();
 
 		xmppConnectionService.setOnRtpConnectionUpdateListener(connection);