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

Commit 1394f8ca authored by Edgar Arriaga's avatar Edgar Arriaga Committed by Edgar Arriaga García
Browse files

Fix telecom contact name not updating after async query is done

Make caller info fire its update callback when it finished querying
to make sure incallservice is informed of such change and can retrieve the information from call details such as contact name.

Bug: 240341306
Test: Manual

Change-Id: Ib8542ae134a7008df2f0976cf198e541b4ffbfd5
parent 642e11a3
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -2227,9 +2227,9 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable,
        Log.v(this, "handleCreateConnectionSuccessful %s", connection);
        setTargetPhoneAccount(connection.getPhoneAccount());
        setHandle(connection.getHandle(), connection.getHandlePresentation());

        setCallerDisplayName(
                connection.getCallerDisplayName(), connection.getCallerDisplayNamePresentation());

        setConnectionCapabilities(connection.getConnectionCapabilities());
        setConnectionProperties(connection.getConnectionProperties());
        setIsVoipAudioMode(connection.getIsVoipAudioMode());
@@ -3373,11 +3373,14 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable,
            return;
        }

        String newName = callerInfo.getName();
        boolean contactNameChanged = mCallerInfo == null || !mCallerInfo.getName().equals(newName);

        mCallerInfo = callerInfo;
        Log.i(this, "CallerInfo received for %s: %s", Log.piiHandle(mHandle), callerInfo);

        if (mCallerInfo.getContactDisplayPhotoUri() == null ||
                mCallerInfo.cachedPhotoIcon != null || mCallerInfo.cachedPhoto != null) {
        if (mCallerInfo.getContactDisplayPhotoUri() == null || mCallerInfo.cachedPhotoIcon != null
            || mCallerInfo.cachedPhoto != null || contactNameChanged) {
            for (Listener l : mListeners) {
                l.onCallerInfoChanged(this);
            }
+5 −0
Original line number Diff line number Diff line
@@ -805,6 +805,11 @@ public class InCallController extends CallsManagerListenerBase implements
            updateCall(call);
        }

        @Override
        public void onCallerInfoChanged(Call call) {
            updateCall(call);
        }

        /**
         * Listens for changes to extras reported by a Telecom {@link Call}.
         *