<!-- Control the behavior when the user short presses the power button. 0 - Nothing 1 - Go to sleep (doze) 2 - Really go to sleep (don't doze) 3 - Really go to sleep and go home (don't doze) 4 - Go to home 5 - Dismiss IME if shown. Otherwise go to home --> <integername="config_shortPressOnPowerBehavior">1</integer>
<!-- Control the behavior when the user double presses the power button. 0 - Nothing 1 - Toggle theater mode setting 2 - Brightness boost --> <integername="config_doublePressOnPowerBehavior">0</integer>
<!-- Control the behavior when the user triple presses the power button. 0 - Nothing 1 - Toggle theater mode setting 2 - Brightness boost --> <integername="config_triplePressOnPowerBehavior">0</integer>
可以看到,这里连续几个配置都是点击 power 键的参数,我们就可以根据需要调整了。
我这里用的是 MTK TV 方案的AOSP源码,不同的方案商的代码可能有点差别,但都大同小异,核心的东西还是差不多,查找解决办法也差不多。