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

Commit 313c91ea authored by Joy Babafemi's avatar Joy Babafemi Committed by Android (Google) Code Review
Browse files

Merge "Notify autofill manager visibility changed in dispatchDetachedFromWindow logic" into main

parents 53b17012 b7617a6e
Loading
Loading
Loading
Loading
+22 −18
Original line number Diff line number Diff line
@@ -16212,7 +16212,27 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        if (fg != null && isVisible != fg.isVisible()) {
            fg.setVisible(isVisible, false);
        }
        notifyAutofillManagerViewVisibilityChanged(isVisible);
        if (isVisible != oldVisible) {
            if (isAccessibilityPane()) {
                notifyViewAccessibilityStateChangedIfNeeded(isVisible
                        ? AccessibilityEvent.CONTENT_CHANGE_TYPE_PANE_APPEARED
                        : AccessibilityEvent.CONTENT_CHANGE_TYPE_PANE_DISAPPEARED);
            }
            notifyAppearedOrDisappearedForContentCaptureIfNeeded(isVisible);
            if (!getSystemGestureExclusionRects().isEmpty()) {
                postUpdate(this::updateSystemGestureExclusionRects);
            }
            if (!collectPreferKeepClearRects().isEmpty()) {
                postUpdate(this::updateKeepClearRects);
            }
        }
    }
    private void notifyAutofillManagerViewVisibilityChanged(boolean isVisible) {
        if (isAutofillable()) {
            AutofillManager afm = getAutofillManager();
@@ -16236,24 +16256,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
                }
            }
        }
        if (isVisible != oldVisible) {
            if (isAccessibilityPane()) {
                notifyViewAccessibilityStateChangedIfNeeded(isVisible
                        ? AccessibilityEvent.CONTENT_CHANGE_TYPE_PANE_APPEARED
                        : AccessibilityEvent.CONTENT_CHANGE_TYPE_PANE_DISAPPEARED);
            }
            notifyAppearedOrDisappearedForContentCaptureIfNeeded(isVisible);
            if (!getSystemGestureExclusionRects().isEmpty()) {
                postUpdate(this::updateSystemGestureExclusionRects);
            }
            if (!collectPreferKeepClearRects().isEmpty()) {
                postUpdate(this::updateKeepClearRects);
            }
        }
    }
    /**
@@ -22128,6 +22130,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
                    // Invoking onVisibilityAggregated directly here since the subtree
                    // will also receive detached from window
                    onVisibilityAggregated(false);
                } else {
                    notifyAutofillManagerViewVisibilityChanged(false);
                }
            }
        }