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

Commit 8d918a71 authored by Felipe Leme's avatar Felipe Leme
Browse files

Fix NPE when session is finished before service replies.

Fixes: 35114623
Test: manual verificaiton
Test: CtsAutoFillServiceTestCases passes
Change-Id: Id38babd038c79dc3e7070483437adec1b415a072
parent fb0f3602
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -541,6 +541,11 @@ final class AutoFillManagerServiceImpl {
                Slog.wtf(TAG, "showSaveLocked(): no mStructure");
                return;
            }
            if (mCurrentResponse == null) {
                // Happens when the activity / session was finished before the service replied.
                Slog.d(TAG, "showSaveLocked(): no mCurrentResponse yet");
                return;
            }
            final ArraySet<AutoFillId> savableIds = mCurrentResponse.getSavableIds();
            if (VERBOSE) Slog.v(TAG, "showSaveLocked(): savableIds=" + savableIds);

@@ -562,7 +567,6 @@ final class AutoFillManagerServiceImpl {
                        Slog.d(TAG, "finishSessionLocked(): found a change on " + id + ": "
                                + state.mAutoFillValue);
                    }

                    mUi.showSaveUi();
                    return;
                }