From 7f4137452da683f28df10c6d2b5377cea0d10916 Mon Sep 17 00:00:00 2001 From: Sungjae Date: Wed, 16 Sep 2020 17:01:54 +0900 Subject: Use phoneAccountHandle based on connection After triggering dial, phoneAccountHandle can be changed. In this case, the stack to which dial is requested and the stack to be displayed on the UI can be different. So, modified to use phoneAccountHandle which base on connection, not request. Bug: 168681491 Test: manual Signed-off-by: Sungjae Change-Id: I56ac5b2d4f1b5e8d78741a43a332b025af7e4d54 --- telecomm/java/android/telecom/ConnectionService.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'telecomm') diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java index 6288bc1698e9..b1ccb533e83d 100755 --- a/telecomm/java/android/telecom/ConnectionService.java +++ b/telecomm/java/android/telecom/ConnectionService.java @@ -1988,8 +1988,10 @@ public abstract class ConnectionService extends Service { connection.setAudioModeIsVoip(true); } connection.setTelecomCallId(callId); + PhoneAccountHandle phoneAccountHandle = connection.getPhoneAccountHandle() == null + ? request.getAccountHandle() : connection.getPhoneAccountHandle(); if (connection.getState() != Connection.STATE_DISCONNECTED) { - addConnection(request.getAccountHandle(), callId, connection); + addConnection(phoneAccountHandle, callId, connection); } Uri address = connection.getAddress(); @@ -2005,7 +2007,7 @@ public abstract class ConnectionService extends Service { callId, request, new ParcelableConnection( - request.getAccountHandle(), + phoneAccountHandle, connection.getState(), connection.getConnectionCapabilities(), connection.getConnectionProperties(), -- cgit v1.2.3