Android系统中部分config配置介绍

1、预览壁纸设置之后,略微被放大
Android 设置壁纸之后,实际效果和预览界面有区别
frameworks/base/core/res/res/values/config.xml

<!-- The max scale for the wallpaper when it's zoomed in -->
<item name="config_wallpaperMaxScale" format="float" type="dimen">1.10</item>

这是Android Q的新特性,主界面或者锁屏界面下拉通知栏,壁纸会有一个缩小的效果。
默认设置壁纸主界面和锁屏会被放大1.10f倍显示,下拉通知栏,缩小到1.0倍,有一个壁纸的动画效果。
如果不想主界面和锁屏壁纸放大,将此值config_wallpaperMaxScale修改为1.0

2.深色主题模式(暗黑模式)适配

<!-- Control the default night mode to use when there is no other mode override set.
     One of the following values (see UiModeManager.java):
         0 - MODE_NIGHT_AUTO
         1 - MODE_NIGHT_NO
         2 - MODE_NIGHT_YES
-->
<integer name="config_defaultNightMode">1</integer>

config_defaultNightMode配置为2,即默认为深色主题模式

3.mtk开机默认打开mtklog
device/mediatek/system/common/mtklog/
区分将eng
将mtklog-config-basic-eng.prop中不同对比到mtklog-config-basic-user.prop
将mtklog-config-bsp-eng.prop中不同对比到mtklog-config-bsp-user.prop

4.移除通话功能(只保留上网功能)
frameworks/base/core/res/res/values/config.xml

    <!-- Flag indicating whether the current device is "voice capable".
         If true, this means that the device supports circuit-switched
         (i.e. voice) phone calls over the telephony network, and is
         allowed to display the in-call UI while a cellular voice call is
         active.  This can be overridden to false for "data only" devices
         which can't make voice calls and don't support any in-call UI.

         Note: this flag is subtly different from the
         PackageManager.FEATURE_TELEPHONY system feature, which is
         available on *any* device with a telephony radio, even if the
         device is data-only. -->
    <bool name="config_voice_capable">true</bool>

config_voice_capable的值改为false.修改后需要整个项目全编译,如果修改未成功,建议查看下是否存在 Overlay.
非手机项目客制化需求较多

5.移除短信功能(短信是否支持)
frameworks/base/core/res/res/values/config.xml

    <!-- Flag indicating whether the current device allows sms service.
         If true, this means that the device supports both sending and
         receiving sms via the telephony network.
         This can be overridden to false for "data only" devices
         which can't send and receive sms message.

         Note: Disable SMS also disable voicemail waiting sms,
               cell broadcasting sms, and MMS. -->
    <bool name="config_sms_capable">true</bool>

config_sms_capable的值改为false.修改后需要整个项目全编译,如果修改未成功,建议查看下是否存在 Overlay.
非手机项目客制化需求较多

allow_emergency_numbers_in_call_log

6.展讯user版本默认打开ylog
在这里插入图片描述
1.vendor/sprd/tools/ylog/ylog_common/conf/目录下将ylog.conf.debug中内容拷贝到ylog.conf.user
2.vendor/sprd/platform/packages/apps/LogManager/src/com/sprd/logmanager/utils/CommonUtils.java
public static boolean isUserBuild() {
boolean isUser = Build.TYPE.equalsIgnoreCase(“user”);
return isUser;//=>修改此处直接返回false
}

7.Navigation bar的位置是系统根据手机屏幕密度决定是在屏幕下方还是右方,如果希望横屏时显示在下方,可以修改配置

     <!-- Controls whether the nav bar can move from the bottom to the side in landscape.
          Only applies if the device display is not square. -->
-    <bool name="config_navBarCanMove">true</bool>
+    <bool name="config_navBarCanMove">false</bool>

8.当切换壁纸时,快捷面板中的快捷键的颜色怎么才不会随着壁纸的颜色改变而改变?
+++ b/packages/SystemUI/res/values/flags.xml

   <bool name="flag_notification_pipeline2_rendering">false</bool>
   <bool name="flag_notif_updates">true</bool>
-  <bool name="flag_monet">true</bool>
+  <bool name="flag_monet">false</bool>

系统主题颜色会根据设置壁纸的颜色而变化,把flag_monet 置为false 即可屏蔽该功能,
该功能屏蔽后会导致[MADA][M54]Dynamic color tonal palettes检查项不符合要求,不符合原因为彩蛋背景不会根据壁纸颜色改变而改变,请客户根据项目情况自行评估是否需要MADA测试,如不需要可将该flag 置为false ,屏蔽该功能!

9.遇到固定fingeprint,修改某些模块,添加了新的资源会导致fota升级后相应模块资源乱掉的问题,比如如settings,camera等?在这里插入图片描述 /**
* The initial enabled state of the cache before other checks are done.
*/
private static final boolean DEFAULT_PACKAGE_PARSER_CACHE_ENABLED = true;
将DEFAULT_PACKAGE_PARSER_CACHE_ENABLED的值修改为:false

10.平板项目,支持屏幕四个方向旋转

    <!-- If true, the screen can be rotated via the accelerometer in all 4
         rotations as the default behavior. -->
    <!-- 如果为true,则可以4个方位都可随之旋转->
    <bool name="config_allowAllRotations">true</bool>

11.控制媒体音量的安全级别或限制
当config_safe_media_volume_enabled被启用(即设置为true)时,Android设备可能会限制媒体音量的最大级别,
以防止用户意外地将音量设置得过高,这可能对听力造成损害,尤其是在长时间或频繁地暴露在高音量下。
     <!-- Whether safe headphone volume is enabled or not (country specific). -->
-    <bool name="config_safe_media_volume_enabled">true</bool>
+    <bool name="config_safe_media_volume_enabled">false</bool>

11.电源按钮支持指纹传感器配置

     <!-- Indicates whether device has a power button fingerprint sensor. -->
-    <bool name="config_is_powerbutton_fps" translatable="false" >false</bool>
+    <bool name="config_is_powerbutton_fps" translatable="false" >true</bool>

待继续补充

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值