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

Commit 2689c369 authored by TYM Tsai's avatar TYM Tsai
Browse files

Fine tune performance for notifyContentCapture()

Notify ContentCapture only when the visible has changed

Bug: 149561198
Test: manual on Chat
Change-Id: Ifb5eb9a71c91f4994f5c1e8e7faed809ef4667e1
parent ea6a210c
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -14684,19 +14684,21 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
                }
            }
        }
        if (isAccessibilityPane()) {
        if (isVisible != oldVisible) {
            if (isAccessibilityPane()) {
                notifyViewAccessibilityStateChangedIfNeeded(isVisible
                        ? AccessibilityEvent.CONTENT_CHANGE_TYPE_PANE_APPEARED
                        : AccessibilityEvent.CONTENT_CHANGE_TYPE_PANE_DISAPPEARED);
            }
        }
            notifyAppearedOrDisappearedForContentCaptureIfNeeded(isVisible);
        if (!getSystemGestureExclusionRects().isEmpty() && isVisible != oldVisible) {
            if (!getSystemGestureExclusionRects().isEmpty()) {
                postUpdateSystemGestureExclusionRects();
            }
        }
    }
    /**
     * Returns the current visibility of the window this view is attached to