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

Commit 30a73e7e authored by Simranjit Kohli's avatar Simranjit Kohli
Browse files

[FillDialog] : Fix case to log no focus with Fill Dialog

Currently, response expires when closing activity. However, we would
want to maintain the reason that was set previously in such a case.

BUG: 234185326
BUG: 248539712
Test: Manually tested with Sample Apk with Fill Dialog and then closing activity.
Change-Id: Ia9b94775608f6c1255bf0f3cbbf5f71eb583683e
parent 09169acc
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -118,6 +118,14 @@ public final class PresentationStatsEventLogger {
        });
    }

    public void maybeSetNoPresentationEventReasonIfNoReasonExists(@NotShownReason int reason) {
        mEventInternal.ifPresent(event -> {
            if (event.mCountShown == 0 && event.mNoPresentationReason == NOT_SHOWN_REASON_UNKNOWN) {
                event.mNoPresentationReason = reason;
            }
        });
    }

    public void maybeSetAvailableCount(@Nullable List<Dataset> datasetList,
            AutofillId currentViewId) {
        mEventInternal.ifPresent(event -> {
+1 −1
Original line number Diff line number Diff line
@@ -2922,7 +2922,7 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
            if (sDebug) {
                Slog.d(TAG, "Set the response has expired.");
            }
            mPresentationStatsEventLogger.maybeSetNoPresentationEventReason(
            mPresentationStatsEventLogger.maybeSetNoPresentationEventReasonIfNoReasonExists(
                        NOT_SHOWN_REASON_VIEW_CHANGED);
            mPresentationStatsEventLogger.logAndEndEvent();
            return;