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

Commit dd23777d authored by Felipe Leme's avatar Felipe Leme
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
parent 494b20c8
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;