在alps/frameworks/base/core/java/android/content/res/Configuration.java文件中如下
public void setToDefaults() 这个方法中进行修改,
如:把默认字体要改为超大,把fontScale值改为1.15f,然后重新build framework.jar这个模块即可;
public void setToDefaults() {
fontScale = 1.15f; //normal value is 1
mcc = mnc = 0;
注意:Settings中系统的字体大小,在/packages/apps/Settings/res/values/arrays.xml文件中的”entryvalues_font_size”这个tag中定义
Small:0.9
Normal:1.0
Large:1.1
Extra Large:1.15
fontScale值必须是上述中的一个。
以及修改packages/apps/setttings/res/values/arrays.xml
<string-array name="entries_font_size">
<item msgid="6490061470416867723">Small</item>
<item msgid="3579015730662088893">Normal</item>
<item msgid="1678068858001018666">Large</item>
<item msgid="490158884605093126">Extra large</item>
</string-array>
<string-array name="entryvalues_font_size" translatable="false">
<item>0.9</item>
<item>1.0</item>
<item>1.1</item>
<item>1.15</item>
</string-array>