您现在的位置是:首页 >技术交流 >android framework原生功能配置改动网站首页技术交流

android framework原生功能配置改动

通信侠 2026-01-13 12:01:03
简介android framework原生功能配置改动

这篇blog会不定期更新关于framework层比较小的改动,多是基于已有的android原生代码配置。

1. 删除壁纸放大效果

客户提供的图片资源做成开机动画和壁纸,反馈发现动画正常,但是桌面壁纸显示的比例被放大了。

Index: frameworks/base/core/res/res/values/config.xml
===================================================================
--- frameworks/base/core/res/res/values/config.xml	(版本 937)
+++ frameworks/base/core/res/res/values/config.xml	(版本 938)
@@ -5040,7 +5040,7 @@
     <item name="config_wallpaperMinScale" format="float" type="dimen">1</item>
 
     <!-- The max scale for the wallpaper when it's zoomed in -->
-    <item name="config_wallpaperMaxScale" format="float" type="dimen">1.10</item>
+    <item name="config_wallpaperMaxScale" format="float" type="dimen">1</item>
 
     <!-- If true, the wallpaper will scale regardless of the value of shouldZoomOutWallpaper() -->
     <bool name="config_alwaysScaleWallpaper">false</bool>

2. 去除开机键持续快速按会拨打紧急急救电话

Index: frameworks/base/core/res/res/values/config.xml
===================================================================
--- frameworks/base/core/res/res/values/config.xml	(版本 246)
+++ frameworks/base/core/res/res/values/config.xml	(版本 247)
@@ -3617,11 +3617,11 @@
 
     <!-- Allow the gesture to quick tap the power button multiple times to start the emergency sos
          experience while the device is non-interactive. -->
-    <bool name="config_emergencyGestureEnabled">true</bool>
+    <bool name="config_emergencyGestureEnabled">false</bool> <!-- @ modify -->
 
     <!-- Allow the gesture power + volume up to change the ringer mode while the device
          is interactive. -->

3. 取消掉按两下电源键进入相机

Index: frameworks/base/core/res/res/values/config.xml
===================================================================
--- frameworks/base/core/res/res/values/config.xml	(版本 246)
+++ frameworks/base/core/res/res/values/config.xml	(版本 247)
@@ -3617,11 +3617,11 @@
 
     <!-- Allow the gesture to double tap the power button twice to start the camera while the device
          is non-interactive. -->
-    <bool name="config_cameraDoubleTapPowerGestureEnabled">true</bool>
+    <bool name="config_cameraDoubleTapPowerGestureEnabled">false</bool> <!-- @ modify -->

风语者!平时喜欢研究各种技术,目前在从事后端开发工作,热爱生活、热爱工作。