bug系列-------home key 失灵

最近遇到一个bug,说在setting界面下home key 失灵

这么奇怪的问题先看log:

结果发现有个奇怪的log就是有来电

12-07 13:05:54.818  2460  3526 I WindowManager: Ignoring HOME; there's a ringing incoming call.
12-07 13:05:55.326  2460  3526 D Telecom : [TELECOM][TelecomServiceImpl]: isPrivilegedDialerCalling = android
12-07 13:05:55.330  2460  3526 I WindowManager: Ignoring HOME; there's a ringing incoming call.
12-07 13:05:55.735  4017  4017 D wpa_supplicant: wlan0: Control interface command 'SIGNAL_POLL'
12-07 13:05:55.784  2460  3526 D Telecom : [TELECOM][TelecomServiceImpl]: isPrivilegedDialerCalling = android
12-07 13:05:55.788  2460  3526 I WindowManager: Ignoring HOME; there's a ringing incoming call.
12-07 13:05:56.187  2460  3526 D Telecom : [TELECOM][TelecomServiceImpl]: isPrivilegedDialerCalling = android
12-07 13:05:56.192  2460  3526 I WindowManager: Ignoring HOME; there's a ringing incoming call.
12-07 13:05:56.384     0     0 I         : CM36283--- NO calibration data, Factory branch , NO default config

这个WindowManager: Ignoring HOME; there's a ringing incoming call在哪里呢,就在上一片文章的最后几个函数里

 public long interceptKeyBeforeDispatching(WindowState win, KeyEvent event, int policyFlags) 里的

 if (keyCode == KeyEvent.KEYCODE_HOME) {

    TelecomManager telecomManager = getTelecommService();
                if (telecomManager != null && telecomManager.isRinging()) {
                    Log.i(TAG, "Ignoring HOME; there's a ringing incoming call.");
                    return -1;
                }

}

所以对照起来发现就是在有来电的情况下,本来home key就不灵,这个问题在于来电没有显示在界面上,所以误认为是home key失灵

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值