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

Commit 2fc94acf authored by Tim Yu's avatar Tim Yu
Browse files

Autofill Fix Latency Metrics

Fix unexpected cases where
t.metric_array.metric.event.autofill.event_autofill_fill_response_reported.atom.latency_response_processing_millis is not initialized

Test: locally test metric is logged
Fixes: 326516791
Change-Id: Id973cb4d9ee7d181276585e86fda830ec3ce42a6
parent 58dd487c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2383,6 +2383,7 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
                mFillResponseEventLogger.maybeSetResponseStatus(RESPONSE_STATUS_FAILURE);
            }
            mPresentationStatsEventLogger.logAndEndEvent();
            mFillResponseEventLogger.maybeSetLatencyResponseProcessingMillis();
            mFillResponseEventLogger.logAndEndEvent();
        }
        notifyUnavailableToClient(AutofillManager.STATE_UNKNOWN_FAILED,
@@ -5400,6 +5401,7 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
        }
        // Log the existing FillResponse event.
        mFillResponseEventLogger.maybeSetAvailableCount(0);
        mFillResponseEventLogger.maybeSetLatencyResponseProcessingMillis();
        mFillResponseEventLogger.logAndEndEvent();
        mService.resetLastResponse();