Number matching digits

Source: Internet
Author: User

1. alps \ external \ SQLite \ Android \ oldphonenumberutils. the value of min_match in CPP. If it is 11, it is an 11-bit match. If it is 7, it is a 7-bit match.

2. If no source code is available, check whether the featureoption. mtk_cta_support switch is true. If the internal code is true, 11-bit matching is used. If the source code is false, 7-bit matching is used.


[Description]
Matching numbers based on the mccmnc of the SIM card to adapt to different lengths,
[Solution]
1. Modify external \ SQLite \ Android \ oldphonenumberutils. cpp,
Add code:
Static int getmatchcountbymccmnc ()
{
Int mactchcount = 7;
Char * pmccmnc = (char *) malloc (40 );
Memset (pmccmnc, 0, sizeof (char) * 40 );
Property_get ("GSM. Sim. Operator. Numeric", pmccmnc, "0 ");
/*...*/
Free (pmccmnc );
Return mactchcount;
}

# Else
Change static int min_match = 7
Min_match = getmatchcountbymccmnc ();

2. Modify Alps \ frameworks \ base \ telephony \ Java \ Android \ telephony \ phonenumberutils. Java
Add code:
Public static int getmatchcountbymccmnc ()
{
Int mactchcount = 7;
String strmccmnc;
Strmccmnc = systemproperties. Get ("GSM. Sim. Operator. Numeric ");
/* Cal the mactchcount by mccmnc */
...
Return mactchcount;
}
Modify static final int min_match = 7 as follows:
Int min_match = getmatchcountbymccmnc ();
Find a better document ..
Modify Alps \ frameworks \ base \ telephony \ Java \ Android \ telephony \ phonenumberutils. Java

Modify external \ SQLite \ Android \ oldphonenumberutils. cpp,

The path should be here to modify the number.


Number matching digits

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.