Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7be441e4 authored by Mahesh Telang's avatar Mahesh Telang Committed by Automerger Merge Worker
Browse files

Connection Service Wrapper does not update the connection attributes when the...

Connection Service Wrapper does not update the connection attributes when the connection manager changed it. am: d25baf7e am: 12e1fe86

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/services/Telecomm/+/17802695



Change-Id: I3a2a74e4743baca72e2374cd4e7d4073ed1cf81a
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 7dce27bd 12e1fe86
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.Objects;

/**
 * Wrapper for {@link IConnectionService}s, handles binding to {@link IConnectionService} and keeps
@@ -967,6 +968,31 @@ public class ConnectionServiceWrapper extends ServiceBinder implements

                        if (alreadyAddedConnection != null
                                && mCallIdMapper.getCall(callId) == null) {
                            if (!Objects.equals(connection.getHandle(),
                                    alreadyAddedConnection.getHandle())) {
                                alreadyAddedConnection.setHandle(connection.getHandle());
                            }
                            if (connection.getHandlePresentation() !=
                                    alreadyAddedConnection.getHandlePresentation()) {
                                alreadyAddedConnection.setHandle(connection.getHandle(),
                                        connection.getHandlePresentation());
                            }
                            if (!Objects.equals(connection.getCallerDisplayName(),
                                    alreadyAddedConnection.getCallerDisplayName())) {
                                alreadyAddedConnection.setCallerDisplayName(connection
                                                .getCallerDisplayName(),
                                        connection.getCallerDisplayNamePresentation());
                            }
                            if (connection.getConnectionCapabilities() !=
                                    alreadyAddedConnection.getConnectionCapabilities()) {
                                alreadyAddedConnection.setConnectionCapabilities(connection
                                        .getConnectionCapabilities());
                            }
                            if (connection.getConnectionProperties() !=
                                    alreadyAddedConnection.getConnectionProperties()) {
                                alreadyAddedConnection.setConnectionCapabilities(connection
                                        .getConnectionProperties());
                            }
                            mCallIdMapper.addCall(alreadyAddedConnection, callId);
                            alreadyAddedConnection
                                    .replaceConnectionService(ConnectionServiceWrapper.this);