If some overseas demand, for number match number of digits, need first 10 bit match, if cannot match, then replace 7 bit match
Examples of specific situations:
Case 1:
If you have saved: a:04165191666, b:5191666, the call number is: 04165191666
Because it is a 7-bit match, both A and B can match, but the best match is a, and the last shows A;
Call 5191666 is matched to B.
Case 2:
Save a:04165191666 only,
Call 5191666 or 04165191666 matches a.
Case 3:
Save b:5191666 only,
The call 5191666 or 04165191666 matches B.
On the basis of 7 match, the matching number match can be further filtered.
First, you need to modify the Min_match to 7-bit matching, please modify the following two files to ensure that return Min_match are 7
1, Phonenumberutils.java in the Min_match;
2, OldPhoneNumberUtils.cpp in the Min_match;
In addition, please modify the Dialersearchutils.java (alps\packages\providers\contactsprovider\src\com\android\providers\contacts) in the
public static cursor findnumberexactmatchedcursor (cursor cursor, String normalizednumber) method
Here's a description:
This method is based on the number matching, then filters the exact number and returns
Input parameters:
The cursor is the data returned after all 7-bit matches, followed by an exact match from the face.
Normalizednumber is the number used by Call/mms
Output:
If the return is already matched, the
Matrixcursor exactcursor = matrixcursorfromcursorrow (cursor, cursor.getposition ());
Cursor.close ();
return exactcursor;
If there is no match, then
return null;
Two other numbers, please explain:
Normalizednumber is the number used by Call/mms
Data1 is the full number found in the database.
You can make a guest in this function to meet the requirements.
Android first 10-bit match, if not match, then replace 7-bit match