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

Commit 33653152 authored by Philip P. Moltmann's avatar Philip P. Moltmann
Browse files

Do not show UI when currentID changed.

Test: autofill cts tests (no new failures)
Fixes: 36992897
Change-Id: I0c97a84c034533d07544eb3845ff52cdab107f2a
parent 0ff1b458
Loading
Loading
Loading
Loading
+16 −6
Original line number Diff line number Diff line
@@ -311,13 +311,23 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
    @Override
    public void requestShowFillUi(AutofillId id, int width, int height,
            IAutofillWindowPresenter presenter) {
        synchronized (mLock) {
            if (id.equals(mCurrentViewId)) {
                try {
            final ViewState currentView = mViewStates.get(mCurrentViewId);
                    final ViewState view = mViewStates.get(id);
                    mClient.requestShowFillUi(mWindowToken, id, width, height,
                    currentView.getVirtualBounds(), presenter);
                            view.getVirtualBounds(),
                            presenter);
                } catch (RemoteException e) {
                    Slog.e(TAG, "Error requesting to show fill UI", e);
                }
            } else {
                if (DEBUG) {
                    Slog.d(TAG, "Do not show full UI on " + id + " as it is not the current view ("
                            + mCurrentViewId + ") anymore");
                }
            }
        }
    }

    // AutoFillUiCallback