default locale 设置地区
xxx@ubuntu-server:~$ grep -rsn "PRODUCT_DEFAULT_LOCALE" ./android/build
./android/build/core/Makefile:231: PRODUCT_DEFAULT_LOCALE="$(call get-default-product-locale,$(PRODUCT_LOCALES))" \
./android/build/tools/buildinfo.sh:54:if [ -n "$PRODUCT_DEFAULT_LOCALE" ] ; then
./android/build/tools/buildinfo.sh:55: echo "ro.product.locale=$PRODUCT_DEFAULT_LOCALE"
然后通过build/tool/buildinfo.sh文件将如下段写到文件build.prop,如下:
./android/frameworks/base/core/jni/AndroidRuntime.cpp:431: // If persist.sys.locale and ro.product.locale are missing,
./android/frameworks/base/core/jni/AndroidRuntime.cpp:433: const std::string productLanguage = getProperty("ro.product.locale.language", "en");
./android/frameworks/base/core/jni/AndroidRuntime.cpp:434: const std::string productRegion = getProperty("ro.product.locale.region", "US");
./android/frameworks/base/core/jni/AndroidRuntime.cpp:853: const std::string locale = readLocale();
AndroidRuntime.cpp
createJavaThread() --> javaCreateThreadEtc() -- > start() --> startVm() --> readLocale()
更多相关文章
- 改写ListView样式
- android手电筒开发
- cocos2d-x android
- android游戏开发课程layout_…
- Android的文件操作
- Android(安卓)studio学习之TextView、EditText、Button、ImageVi
- android基础入门(二)——创建android工程
- Android(安卓)动态加载(四) - 简单demo实现
- 如何安装apk文件在Android仿真器中