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

Commit aabd50e0 authored by Qasid Sadiq's avatar Qasid Sadiq Committed by Android (Google) Code Review
Browse files

Merge "Populate scrollX and scrollY on AccessibilityEvents."

parents 673f20da 002e3cf7
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -8273,6 +8273,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        event.setPackageName(getContext().getPackageName());
        event.setEnabled(isEnabled());
        event.setContentDescription(mContentDescription);
        event.setScrollX(getScrollX());
        event.setScrollY(getScrollY());
        switch (event.getEventType()) {
            case AccessibilityEvent.TYPE_VIEW_FOCUSED: {
+8 −8
Original line number Diff line number Diff line
@@ -90,13 +90,13 @@ public class AccessibilityRecord {
    int mItemCount = UNDEFINED;
    int mFromIndex = UNDEFINED;
    int mToIndex = UNDEFINED;
    int mScrollX = UNDEFINED;
    int mScrollY = UNDEFINED;
    int mScrollX = 0;
    int mScrollY = 0;

    int mScrollDeltaX = UNDEFINED;
    int mScrollDeltaY = UNDEFINED;
    int mMaxScrollX = UNDEFINED;
    int mMaxScrollY = UNDEFINED;
    int mMaxScrollX = 0;
    int mMaxScrollY = 0;

    int mAddedCount= UNDEFINED;
    int mRemovedCount = UNDEFINED;
@@ -878,10 +878,10 @@ public class AccessibilityRecord {
        mItemCount = UNDEFINED;
        mFromIndex = UNDEFINED;
        mToIndex = UNDEFINED;
        mScrollX = UNDEFINED;
        mScrollY = UNDEFINED;
        mMaxScrollX = UNDEFINED;
        mMaxScrollY = UNDEFINED;
        mScrollX = 0;
        mScrollY = 0;
        mMaxScrollX = 0;
        mMaxScrollY = 0;
        mAddedCount = UNDEFINED;
        mRemovedCount = UNDEFINED;
        mClassName = null;
+0 −2
Original line number Diff line number Diff line
@@ -951,8 +951,6 @@ public class HorizontalScrollView extends FrameLayout {
    public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) {
        super.onInitializeAccessibilityEventInternal(event);
        event.setScrollable(getScrollRange() > 0);
        event.setScrollX(mScrollX);
        event.setScrollY(mScrollY);
        event.setMaxScrollX(getScrollRange());
        event.setMaxScrollY(mScrollY);
    }
+0 −2
Original line number Diff line number Diff line
@@ -1010,8 +1010,6 @@ public class ScrollView extends FrameLayout {
        super.onInitializeAccessibilityEventInternal(event);
        final boolean scrollable = getScrollRange() > 0;
        event.setScrollable(scrollable);
        event.setScrollX(mScrollX);
        event.setScrollY(mScrollY);
        event.setMaxScrollX(mScrollX);
        event.setMaxScrollY(getScrollRange());
    }
+0 −1
Original line number Diff line number Diff line
@@ -4967,7 +4967,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
    public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) {
        super.onInitializeAccessibilityEventInternal(event);
        event.setScrollable(mScrollable);
        event.setScrollX(mScrollX);
        event.setMaxScrollX(mScrollX);
        if (ANCHOR_SCROLLING) {
            // TODO