SystemUI 锁屏来电界面点击Home键无作用

不积跬步无以至千里

一.前摘

        其实这里是原生的设计,故意在锁屏的来电界面,不让执行home键的流程(这里应该是启动launcher的主activity),因此这里我们要针对它的逻辑进行修改。

二.修改

代码路径:

app/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java

private boolean onHomeTouch(View v, MotionEvent event) {
        if (mHomeBlockedThisTouch && event.getActionMasked() != MotionEvent.ACTION_DOWN) {
            return true;
        }
        // If an incoming call is ringing, HOME is totally disabled.
        // (The user is already on the InCallUI at this point,
        // and his ONLY options are to answer or reject the call.)
        switch (event.getAction()) {
            case MotionEvent.ACTION_DOWN:
                mHomeBlockedThisTouch = false;
//修改的地方为把关于判断此时是否为处于接打电话,把这块逻辑去掉,就可以了
//                TelecomManager telecomManager =
//                        getContext().getSystemService(TelecomManager.class);
//          

猜你喜欢

转载自blog.csdn.net/WDYShowTime/article/details/105106431