jQuery鼠标指针特效

Android 11 -- 关于dialog和悬浮窗导致SystemUI状态栏下拉频繁闪烁(窗口焦点问题)

bug描述:如果当前app是全屏的属性,导致状态栏隐藏且有dialog 弹出时,
这个情况下想下拉显示状态栏,会导致状态栏频繁闪烁。

//services/core/java/com/android/server/wm/DisplayPolicy.java

//更新系统状态栏的属性
int updateSystemUiVisibilityLw() {
        // If there is no window focused, there will be nobody to handle the events
        // anyway, so just hang on in whatever state we're in until things settle down.
        //只有焦点窗口才能控制系统栏,没有焦点的窗口,不会响应这些事件
        WindowState winCandidate = (mFocusedWindow != null) ? mFocusedWindow : mTopFullscreenOpaqueWindowState;
        
        //所以可以在这里打印日志,看出现bug时焦点窗口的情况,然后分析
        android.util.Log.d("TAG",(mFocusedWindow != null)+"");
        android.util.Log.d("TAG",mFocusedWindow.toString()+"");//打印当前获取焦点的窗口信息:app的包名
        
        if (winCandidate == null) {
            return 0;
        }

        //add
        if (mFocusedWindow != null) {
            if (mFocusedWindow.getAttrs().token == null) {
                winCandidate = mTopFullscreenOpaqueWindowState;
            }
        }
        //end

        // The immersive mode confirmation should never affect the system bar visibility, otherwise
        // it will unhide the navigation bar and hide itself.
        if (winCandidate.getAttrs().token == mImmersiveModeConfirmation.getWindowToken()) {
            ...........
        }
            ................
        }

参考

posted @   僵小七  阅读(504)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· 实操Deepseek接入个人知识库
· CSnakes vs Python.NET:高效嵌入与灵活互通的跨语言方案对比
· 【.NET】调用本地 Deepseek 模型
· Plotly.NET 一个为 .NET 打造的强大开源交互式图表库
点击右上角即可分享
微信分享提示