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

Commit a00ed077 authored by Yorke Lee's avatar Yorke Lee Committed by Android Git Automerger
Browse files

am 568a22f1: Fix potential mismatched caller information

* commit '568a22f1d76c83e02b3494a506c21663897d85bb':
  Fix potential mismatched caller information
parents b2cbce12 ad5887d8
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -513,7 +513,15 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
    }

    private void onContactInfoComplete(String callId, ContactCacheEntry entry, boolean isPrimary) {
        final boolean entryMatchesExistingCall =
                (isPrimary && mPrimary != null && TextUtils.equals(callId,  mPrimary.getId())) ||
                (!isPrimary && mSecondary != null && TextUtils.equals(callId, mSecondary.getId()));
        if (entryMatchesExistingCall) {
            updateContactEntry(entry, isPrimary);
        } else {
            Log.w(this, "Dropping stale contact lookup info for " + callId);
        }

        if (entry.name != null) {
            Log.d(TAG, "Contact found: " + entry);
        }