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

Commit 74d81b8f authored by Felipe Leme's avatar Felipe Leme
Browse files

Fixed NPE when AutofillManager.getClient() returns null.

Test: atest CtsContentCaptureServiceTestCases # sanity check, issue is not easily reproducible

Fixes: 131924763

Change-Id: I5785a0b03eb1bc73b4e5d3a8da6e044dafac3012
parent 56c006f5
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -3212,7 +3212,12 @@ public final class AutofillManager {
            final AutofillManager afm = mAfm.get();
            if (afm == null) return null;

            final View view = afm.getClient().autofillClientFindViewByAutofillIdTraversal(id);
            final AutofillClient client = afm.getClient();
            if (client == null) {
                Log.w(TAG, "getViewCoordinates(" + id + "): no autofill client");
                return null;
            }
            final View view = client.autofillClientFindViewByAutofillIdTraversal(id);
            if (view == null) {
                Log.w(TAG, "getViewCoordinates(" + id + "): could not find view");
                return null;