summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSungjae <sung_jae.kim@samsung.com>2020-09-16 17:01:54 +0900
committerSungjae <sung_jae.kim@samsung.com>2020-10-19 11:14:35 +0900
commit7f4137452da683f28df10c6d2b5377cea0d10916 (patch)
tree8c78aa827fb9775cb79a3334efc0fc31fceb6932
parent20a3234d5bb0e7132610416369f53ec9dd9a35e5 (diff)
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
-rwxr-xr-xtelecomm/java/android/telecom/ConnectionService.java6
1 files changed, 4 insertions, 2 deletions
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(),