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

Commit 9a65d514 authored by Qasid Sadiq's avatar Qasid Sadiq
Browse files

Revert "The source of subtree chagnes should be the viewParent"

This reverts commit ed508280.

Reason for revert: Caused a performance regression: b/138853920

Change-Id: Ibc981ffca7aa0bf365eeea4d4e5e57259ce40f35
parent ed508280
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -13362,10 +13362,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        if ((mPrivateFlags2 & PFLAG2_SUBTREE_ACCESSIBILITY_STATE_CHANGED) == 0) {
            mPrivateFlags2 |= PFLAG2_SUBTREE_ACCESSIBILITY_STATE_CHANGED;
            if (mParent != null && mParent instanceof View) {
            if (mParent != null) {
                try {
                    mParent.notifySubtreeAccessibilityStateChanged(
                            this, (View) mParent, AccessibilityEvent.CONTENT_CHANGE_TYPE_SUBTREE);
                            this, this, AccessibilityEvent.CONTENT_CHANGE_TYPE_SUBTREE);
                } catch (AbstractMethodError e) {
                    Log.e(VIEW_LOG_TAG, mParent.getClass().getSimpleName() +
                            " does not fully implement ViewParent", e);
+4 −5
Original line number Diff line number Diff line
@@ -5144,7 +5144,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
        }

        if (child.getVisibility() != View.GONE) {
            child.notifySubtreeAccessibilityStateChangedIfNeeded();
            notifySubtreeAccessibilityStateChangedIfNeeded();
        }

        if (mTransientIndices != null) {
@@ -5432,7 +5432,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
        dispatchViewRemoved(view);

        if (view.getVisibility() != View.GONE) {
            view.notifySubtreeAccessibilityStateChangedIfNeeded();
            notifySubtreeAccessibilityStateChangedIfNeeded();
        }

        int transientCount = mTransientIndices == null ? 0 : mTransientIndices.size();
@@ -5740,7 +5740,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
        }
        dispatchVisibilityAggregated(isAttachedToWindow() && getWindowVisibility() == VISIBLE
                && isShown());
        child.notifySubtreeAccessibilityStateChangedIfNeeded();
        notifySubtreeAccessibilityStateChangedIfNeeded();
    }

    /**
@@ -6146,8 +6146,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
        if (invalidate) {
            invalidateViewProperty(false, false);
        }
        notifySubtreeAccessibilityStateChanged(
                this, this, AccessibilityEvent.CONTENT_CHANGE_TYPE_SUBTREE);
        notifySubtreeAccessibilityStateChangedIfNeeded();
    }

    @Override
+1 −2
Original line number Diff line number Diff line
@@ -1106,8 +1106,7 @@ public abstract class AdapterView<T extends Adapter> extends ViewGroup {
            checkSelectionChanged();
        }

        notifySubtreeAccessibilityStateChanged(
                this, this, AccessibilityEvent.CONTENT_CHANGE_TYPE_SUBTREE);
        notifySubtreeAccessibilityStateChangedIfNeeded();
    }

    /**