Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cac1d6c3 authored by Hongming Jin's avatar Hongming Jin
Browse files

Add AccessibilityTracing and trace AccessibilityController.

The tracing is for a11y engineering team use for debugging purpose. It
is disabled by default and can be enabled only by shell command. The cl
for the shell command change will be submitted after this cl. See "Test"
section below for the command details.
Expose interface through WindowManagerInternal to allow a11y use the trace feature.

Bug: 157601519
Test: adb shell cmd accessibility start-trace
      adb shell cmd accessibility stop-trace
Change-Id: I4cdb8798b29cd4a246db71d8cb17fe2c4429cd51
parent 241f3b29
Loading
Loading
Loading
Loading
+597 −115

File changed.

Preview size limit exceeded, changes collapsed.

+1 −2
Original line number Diff line number Diff line
@@ -712,8 +712,7 @@ public class AppTransitionController {
        final AccessibilityController accessibilityController =
                mDisplayContent.mWmService.mAccessibilityController;
        if (accessibilityController != null) {
            accessibilityController.onAppWindowTransitionLocked(
                    mDisplayContent.getDisplayId(), transit);
            accessibilityController.onAppWindowTransition(mDisplayContent.getDisplayId(), transit);
        }
    }

+4 −4
Original line number Diff line number Diff line
@@ -1226,7 +1226,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp

        if (mWmService.mAccessibilityController != null) {
            final int prevDisplayId = prevDc != null ? prevDc.getDisplayId() : INVALID_DISPLAY;
            mWmService.mAccessibilityController.onSomeWindowResizedOrMovedLocked(prevDisplayId,
            mWmService.mAccessibilityController.onSomeWindowResizedOrMoved(prevDisplayId,
                    getDisplayId());
        }
    }
@@ -1850,7 +1850,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
        }

        if (mWmService.mAccessibilityController != null) {
            mWmService.mAccessibilityController.onRotationChangedLocked(this);
            mWmService.mAccessibilityController.onRotationChanged(this);
        }
    }

@@ -3400,7 +3400,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
    }

    void updateAccessibilityOnWindowFocusChanged(AccessibilityController accessibilityController) {
        accessibilityController.onWindowFocusChangedNotLocked(getDisplayId());
        accessibilityController.onWindowFocusChangedNot(getDisplayId());
    }

    private static void onWindowFocusChanged(WindowState oldFocus, WindowState newFocus) {
@@ -4963,7 +4963,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
        if (!mLocationInParentWindow.equals(x, y)) {
            mLocationInParentWindow.set(x, y);
            if (mWmService.mAccessibilityController != null) {
                mWmService.mAccessibilityController.onSomeWindowResizedOrMovedLocked(mDisplayId);
                mWmService.mAccessibilityController.onSomeWindowResizedOrMoved(mDisplayId);
            }
            notifyLocationInParentDisplayChanged();
        }
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ public class DockedStackDividerController {
        mTouchRegion.set(touchRegion);
        // We need to report touchable region changes to accessibility.
        if (mDisplayContent.mWmService.mAccessibilityController != null) {
            mDisplayContent.mWmService.mAccessibilityController.onSomeWindowResizedOrMovedLocked(
            mDisplayContent.mWmService.mAccessibilityController.onSomeWindowResizedOrMoved(
                    mDisplayContent.getDisplayId());
        }
    }
+1 −1
Original line number Diff line number Diff line
@@ -191,7 +191,7 @@ public class ShellRoot {
            }
        }
        if (mDisplayContent.mWmService.mAccessibilityController != null) {
            mDisplayContent.mWmService.mAccessibilityController.onSomeWindowResizedOrMovedLocked(
            mDisplayContent.mWmService.mAccessibilityController.onSomeWindowResizedOrMoved(
                    mDisplayContent.getDisplayId());
        }
    }
Loading