RK 全志 Android 10 && Android 11 去掉连点power键打开相机

RK 全志 Android 10 && Android 11 去掉连点power键打开相机

问题描述

在进行RkAndroid 11 的定制中 遇到一个问题,客户在连点power键之后发现会打开相机,需要去掉指定功能
定位问题发现是调用了isCameraLiftTriggerEnabled这个方法,使用的是config_cameraLiftTriggerSensorType的属性去判断是否打开相机。最终定位到问题
在这里插入图片描述

最终修改的文件是在

frameworks/base/core/res/res/values/config.xml

修改方案如下

--- a/frameworks/base/core/res/res/values/config.xml
+++ b/frameworks/base/core/res/res/values/config.xml
@@ -3258,7 +3258,7 @@
     <!-- Allow the gesture to double tap the power button twice to start the camera while the device
          is non-interactive. -->
-    <bool name="config_cameraDoubleTapPowerGestureEnabled">false</bool>
+    <bool name="config_cameraDoubleTapPowerGestureEnabled">true</bool>
     <!-- Allow the gesture to double tap the volumeup button twice to start the camera while the device
          is non-interactive. -->

总结

android很多的配置都是由xml文件的属性控制,认真查看代码最终都能找到具体是哪个属性控制的,建议有空的时候可以去review下,看一下整个调用过程,会让自己颇有收获。

每日赠言

历史的铁则就是:事后看来无可避免的事,在当时看来总是毫不明显。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值