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

Commit b3bd7b19 authored by Winson Chung's avatar Winson Chung Committed by android-build-merger
Browse files

Merge "Fix regression in updating gesture exclusion rects" into qt-qpr1-dev am: b85d7509

am: 368b3679

Change-Id: I0ec22203b34b8e6a2ede43c97fa8b9fdbfbc7456
parents 87617a9b 368b3679
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ class GestureExclusionTracker {
        while (i.hasNext()) {
            final GestureExclusionViewInfo info = i.next();
            final View v = info.getView();
            if (v == null || !v.isAttachedToWindow() || !v.isShown()) {
            if (v == null || !v.isAttachedToWindow() || !v.isAggregatedVisible()) {
                mGestureExclusionViewsChanged = true;
                i.remove();
                continue;
@@ -123,7 +123,7 @@ class GestureExclusionTracker {
        public int update() {
            final View excludedView = getView();
            if (excludedView == null || !excludedView.isAttachedToWindow()
                    || !excludedView.isShown()) return GONE;
                    || !excludedView.isAggregatedVisible()) return GONE;
            final List<Rect> localRects = excludedView.getSystemGestureExclusionRects();
            final List<Rect> newRects = new ArrayList<>(localRects.size());
            for (Rect src : localRects) {
+12 −2
Original line number Diff line number Diff line
@@ -14323,6 +14323,14 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        }
    }
    /**
     * @return true if this view and all ancestors are visible as of the last
     * {@link #onVisibilityAggregated(boolean)} call.
     */
    boolean isAggregatedVisible() {
        return (mPrivateFlags3 & PFLAG3_AGGREGATED_VISIBLE) != 0;
    }
    /**
     * Internal dispatching method for {@link #onVisibilityAggregated}. Overridden by
     * ViewGroup. Intended to only be called when {@link #isAttachedToWindow()},
@@ -14351,7 +14359,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
    @CallSuper
    public void onVisibilityAggregated(boolean isVisible) {
        // Update our internal visibility tracking so we can detect changes
        boolean oldVisible = (mPrivateFlags3 & PFLAG3_AGGREGATED_VISIBLE) != 0;
        boolean oldVisible = isAggregatedVisible();
        mPrivateFlags3 = isVisible ? (mPrivateFlags3 | PFLAG3_AGGREGATED_VISIBLE)
                : (mPrivateFlags3 & ~PFLAG3_AGGREGATED_VISIBLE);
        if (isVisible && mAttachInfo != null) {
@@ -14403,8 +14411,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        }
        notifyAppearedOrDisappearedForContentCaptureIfNeeded(isVisible);
        if (isVisible != oldVisible) {
            updateSystemGestureExclusionRects();
        }
    }
    /**
     * Returns the current visibility of the window this view is attached to