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

Commit 2cb0d939 authored by wangqi's avatar wangqi Committed by android-build-merger
Browse files

Merge "Add Cequint contact lookup result type." am: 51d78059 am: 3a31549c

am: 1a349735

Change-Id: If2a57b9be3d09cedb504fe8418fb4f4802dd5a2f
parents 646c2a10 1a349735
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -100,5 +100,8 @@ message ContactLookupResult {
    // Number was found in Dialer's local cache and was originally identified
    // as REMOTE_KNOWLEDGE_GRAPH
    LOCAL_CACHE_REMOTE_KNOWLEDGE_GRAPH = 25;

    // Number was identified via Cequint caller ID.
    CEQUINT = 26;
  }
}
+3 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ import android.text.TextUtils;
import com.android.contacts.common.ContactsUtils;
import com.android.contacts.common.ContactsUtils.UserType;
import com.android.contacts.common.util.TelephonyManagerUtils;
import com.android.dialer.logging.ContactLookupResult;
import com.android.dialer.phonenumbercache.ContactInfoHelper;
import com.android.dialer.phonenumbercache.PhoneLookupUtil;
import com.android.dialer.phonenumberutil.PhoneNumberHelper;
@@ -110,6 +111,7 @@ public class CallerInfo {
  public int numberPresentation;
  public int namePresentation;
  public boolean contactExists;
  public ContactLookupResult.Type contactLookupResultType = ContactLookupResult.Type.NOT_FOUND;
  public String phoneLabel;
  /* Split up the phoneLabel into number type and label name */
  public int numberType;
@@ -315,6 +317,7 @@ public class CallerInfo {
    columnIndex = cursor.getColumnIndex(PhoneLookup.SEND_TO_VOICEMAIL);
    info.shouldSendToVoicemail = (columnIndex != -1) && ((cursor.getInt(columnIndex)) == 1);
    info.contactExists = true;
    info.contactLookupResultType = ContactLookupResult.Type.LOCAL_CONTACT;

    // Determine userType by directoryId and contactId
    final String directory =
+2 −1
Original line number Diff line number Diff line
@@ -276,7 +276,7 @@ public class ContactInfoCache implements OnImageLoadCompleteListener {
    cce.isVoicemailNumber = info.isVoiceMailNumber();

    if (info.contactExists) {
      cce.contactLookupResult = ContactLookupResult.Type.LOCAL_CONTACT;
      cce.contactLookupResult = info.contactLookupResultType;
    }
  }

@@ -543,6 +543,7 @@ public class ContactInfoCache implements OnImageLoadCompleteListener {
    // Set contact to exist to avoid phone number service lookup.
    if (hasUpdate) {
      callerInfo.contactExists = true;
      callerInfo.contactLookupResultType = ContactLookupResult.Type.CEQUINT;
    }
  }