When I was working on a traditional Android 4.0 Project, I received a language problem. After the mobile phone was initialized, it started to display traditional Chinese. However, as the network signal appeared, the language was changed to simplified Chinese. I am very confused. After reading the mcctalbe. Java file code (telephone module), I found that I would read two attributes, as shown below:
String L = systemproperties. Get ("Persist. SYS. Language"); string c = systemproperties. Get ("Persist. SYS. Country ");
Without these two attributes, the system language will be changed with the language of your SIM card, that is why the system language changes after the signal occurs.
Then the factory language is set through attributes, as shown below:
Compile the script path:/build/tools/buildinfo. Sh
Ro. Product. locale. Language = $ product_default_language
Ro. Product. locale. region = $ product_default_region
Finally, append the missing "Persist. SYS. Language" and "Persist. SYS. Country" attributes to the end of the script to compile the system. The test is successful.
In summary, the user will also call the activitymanagerservice. Java class to write the persist. SYS. Language attribute when actively changing the language settings.