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

Commit 548fed5e authored by András Kurucz's avatar András Kurucz
Browse files

[Flexiglass] Disable handling a11y scroll events in the NSSL

NSSL is not responsible for scrolling anymore, so it shouldn't handle
custom accessibility scroll events either.

Bug: 360091533
Test: scroll notifications in the shade
Flag: com.android.systemui.scene_container
Change-Id: I55dd240fe7bd2bbbf5984d7f00c2ae0f378383cc
parent 2df19e5a
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -4115,6 +4115,11 @@ public class NotificationStackScrollLayout
     */
    @Override
    public boolean performAccessibilityActionInternal(int action, Bundle arguments) {
        // Don't handle scroll accessibility events from the NSSL, when SceneContainer enabled.
        if (SceneContainerFlag.isEnabled()) {
            return super.performAccessibilityActionInternal(action, arguments);
        }

        if (super.performAccessibilityActionInternal(action, arguments)) {
            return true;
        }
@@ -4875,6 +4880,11 @@ public class NotificationStackScrollLayout
    @Override
    public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) {
        super.onInitializeAccessibilityEventInternal(event);
        // Don't handle scroll accessibility events from the NSSL, when SceneContainer enabled.
        if (SceneContainerFlag.isEnabled()) {
            return;
        }

        event.setScrollable(mScrollable);
        event.setMaxScrollX(mScrollX);
        event.setScrollY(mOwnScrollY);
@@ -4884,6 +4894,11 @@ public class NotificationStackScrollLayout
    @Override
    public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) {
        super.onInitializeAccessibilityNodeInfoInternal(info);
        // Don't handle scroll accessibility events from the NSSL, when SceneContainer enabled.
        if (SceneContainerFlag.isEnabled()) {
            return;
        }

        if (mScrollable) {
            info.setScrollable(true);
            if (mBackwardScrollable) {