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

Commit d25baf7e authored by Mahesh Telang's avatar Mahesh Telang Committed by Tyler Gunn
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.

Connection attributes are not updated when an existing connection is added when existing connection already exists.

Test: Functional test on a test Device.
Fixes: 199512843
Change-Id: I5284f8d1a7cf09456631391a0868f97498e2e1f1
parent 026d702d
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);