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

Commit 7c6e8e6c authored by Felipe Leme's avatar Felipe Leme
Browse files

Fixed NPE when FillService replies with a null FillResponse.

This problem was not detected by CTS tests because the exception is
"harmless" (it's just ignored), but it can be verified at logcat:

W Binder  : Caught a RuntimeException from the binder stub implementation.
W Binder  : java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.IntentSender android.service.autofill.FillResponse.getAuthentication()' on a null object reference
W Binder  : 	at com.android.server.autofill.ViewState.maybeCallOnFillReady(ViewState.java:159)

Bug: 35707731
Test: CtsAutoFillServiceTestCases pass
Test: manual verification
Change-Id: I58330a7e91b2c186bf97897b7d39640010ca630b
parent 64731b1d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -156,7 +156,7 @@ final class ViewState {
        }
        // Then checks if the session has a response waiting authentication; if so, uses it instead.
        final FillResponse currentResponse = mSession.getCurrentResponse();
        if (currentResponse.getAuthentication() != null) {
        if (currentResponse != null && currentResponse.getAuthentication() != null) {
            mListener.onFillReady(currentResponse, this.id, mCurrentValue);
        }
    }