Android 11.0 SystemUI control system gesture left and right sliding back function

1 Overview

  In the 11.0 system rom customization development, the default gestures in the system include three-key navigation and system gesture navigation. After setting the default system gesture navigation, the return function of the left and right sliding gestures is implemented in the SystemUI. Now there is a need to control left and
right The enabling and disabling of the sliding gesture return function, so it is necessary to analyze the specific implementation process of the gesture return function

2. SystemUI controls the system gesture to slide left and right to return to the core code of the function

      frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
      frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/EdgeBackGestureHandler.java

3. SystemUI control system gesture left and right sliding return function analysis
  3.1 NavigationBarView.java function analysis on system gestures

    NavigationBarView is constructed by creating an instance of EdgeBackGestureHandler, which is the core management class of the entire return gesture.

          public NavigationBarView(Context context, AttributeSet attrs) {
            super(context, attrs);
            mIsVertical = false;
            mLongClickableAccessibilityButton = false;
            mNavBarMode = Dependency.get(NavigationModeController.class).addListener(this);
            /* UNISCO:

Guess you like

Origin blog.csdn.net/baidu_41666295/article/details/130628505