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

Commit fc8f87b2 authored by Felipe Leme's avatar Felipe Leme Committed by gitbuildkicker
Browse files

Fixed check for null Anchor.

It was checking if the weak reference pointee was null, but not for a null
weak reference per se.

Fixes: 36643768
Test: manual verification
Test: CtsAutoFillServiceTestCases pass

Change-Id: I106dfd4a91ff1d45f8cb3141a992b06cbe460367
(cherry picked from commit dd23777d)
parent 345d2068
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -2178,9 +2178,14 @@ public class PopupWindow {
            update = true;
        }

        final View anchor = mAnchor.get();
        final int newAccessibilityIdOfAnchor = (anchor != null)
                ? anchor.getAccessibilityViewId() : -1;
        View anchor = null;
        int newAccessibilityIdOfAnchor = -1;

        if (mAnchor != null && mAnchor.get() != null) {
            anchor = mAnchor.get();
            newAccessibilityIdOfAnchor = anchor.getAccessibilityViewId();
        }

        if (newAccessibilityIdOfAnchor != p.accessibilityIdOfAnchor) {
            p.accessibilityIdOfAnchor = newAccessibilityIdOfAnchor;
            update = true;