Android 11.0 SystemUI 下拉状态栏默认展开下拉框(展开下拉快捷)

1.概述

在11.0定制SystemUI 下拉状态栏的时候 ,需要默认展开下拉框 显示出所以的下拉快捷图标 这就要从NotificationPanelView.java中 下拉事件处理 而在11.0中下拉事件全都有NotificationPanelViewController.java 来处理了

2.核心代码

主要代码为:
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java
frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java

3.核心代码功能实现分析

 3.1NotificationPanelViewController.java相关代码分析

@Override
protected TouchHandler createTouchHandler() {
return new TouchHandler() {
@Override
public boolean onInterceptTouchEvent(MotionEvent event) {
if (mBlockTouches || mQsFullyExpanded && mQs.disallowPanelTouches()) {
return false;
}
initDownStates(event);
// Do not let touches go to shade or QS if the bouncer is visible,
// but still let user swipe down to expand the panel, dismissing the bouncer.
if (mStatusBar.isBouncerShowing()) {
return true;
}
if (mBar

猜你喜欢

转载自blog.csdn.net/baidu_41666295/article/details/125417572