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 <sung_jae.kim@samsung.com>
Change-Id: I56ac5b2d4f1b5e8d78741a43a332b025af7e4d54
This commit is contained in:
Sungjae
2020-09-16 17:01:54 +09:00
parent 20a3234d5b
commit 7f4137452d

View File

@@ -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(),