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

Commit 955da771 authored by Philip P. Moltmann's avatar Philip P. Moltmann Committed by gitbuildkicker
Browse files

Do not show UI when currentID changed.

Test: autofill cts tests (no new failures)
Fixes: 36992897
Change-Id: I0c97a84c034533d07544eb3845ff52cdab107f2a
(cherry picked from commit 33653152)
parent 677d89c4
Loading
Loading
Loading
Loading
+16 −6
Original line number Original line Diff line number Diff line
@@ -303,13 +303,23 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
    @Override
    @Override
    public void requestShowFillUi(AutofillId id, int width, int height,
    public void requestShowFillUi(AutofillId id, int width, int height,
            IAutofillWindowPresenter presenter) {
            IAutofillWindowPresenter presenter) {
        synchronized (mLock) {
            if (id.equals(mCurrentViewId)) {
                try {
                try {
            final ViewState currentView = mViewStates.get(mCurrentViewId);
                    final ViewState view = mViewStates.get(id);
                    mClient.requestShowFillUi(mWindowToken, id, width, height,
                    mClient.requestShowFillUi(mWindowToken, id, width, height,
                    currentView.getVirtualBounds(), presenter);
                            view.getVirtualBounds(),
                            presenter);
                } catch (RemoteException e) {
                } catch (RemoteException e) {
                    Slog.e(TAG, "Error requesting to show fill UI", 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
    // AutoFillUiCallback