How does Android modify SIM card language self-adaptation?

Source: Internet
Author: User

 

 

I. default language rules set by the System

  1. The system preset language, that is, the language defined in the makefile file;

    -Location: mediatek/config/$ {Project}/ProjectConfig. mk. The first language is the default language.

     

    1. The system language is the preset language. After the SIM card is inserted, the system language is changed according to the SIM card, by default, the language of the SIM card inserted for the first time after the flash is set to the default language. (If the sim mcc can be found in the built-in mcc table,) if the user does not manually set the language in Settings, in the future, the system language will always be the default language (the SIM card language for the first time). Even if the card is inserted into other countries, the system language will not change. If you manually set the language in Settings, in the future, the system language will be the set language. No matter what card is inserted, the system language will not change and the language will be set manually for the user.

      2. Modify the default language

      1. Cancel the self-adaptive SIM card Language

      Public static void updateMccMncConfiguration (Context context, String mccmnc)

      MccTable. java (frameworksase elephonyjavacomandroidinternal elephony)

      If (mcc! = 0 ){

      SetTimezoneFromMccIfNeeded (context, mcc );

      SetLocaleFromMccIfNeeded(Context, mcc );

      SetWifiCountryCodeFromMcc (context, mcc );

      }

      Each time the plug-in card is started, when the sim is ready, the system will use the updateMccMncConfiguration function, which callsThe setLocaleFromMccIfNeeded function updates the system language based on mcc. You can set whether to call this function to determine whether to switch the language based on sim.

      2. You are required to switch the language based on the SIM card each time.

      Public static void setSystemLocale (Context context, String language, String country)

      ......

      Config. userSetLocale = false;

      Config. simSetLocale = true;

      ......

      Am. updateConfiguration (config );

      The SIM card is inserted at the first boot. If the corresponding language is found based on mcc, the system will save the current SIM card language information. In the future, the system will insert SIM cards in any language, the system language is not switched Based on the sim.The simSetLocale parameter determines whether to save this information. If you set it to false, You can implement adaptive adaptation for each plug-in card (except for manual language setting ).


       

Related Article

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.