From 69a1dd6a74dc5d82d2d208fe7b43246c42fe5732 Mon Sep 17 00:00:00 2001 From: Joanne Chung Date: Thu, 12 May 2022 23:33:08 +0800 Subject: Log no save ui reason if no dataset set. The TYPE_CONTEXT_COMMITED will not be log if there is no dataset in the FillResponse currently. We add no save ui reason in the event history that helps AutofillService to know the reason the save ui not shown. Because the above reason, the event will not be logged even the no save ui reason is set. But it's still useful to log the event to allow the AutofillService to know the no save ui reason so we remove the limitation here. Bug: 217584507 Test: atest InlineFillEventHistoryTest Test: atest FillEventHistoryTest Change-Id: I523c373c9ae12230c27ede81b0ac88d30ee5c27f --- .../autofill/java/com/android/server/autofill/Session.java | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/services/autofill/java/com/android/server/autofill/Session.java b/services/autofill/java/com/android/server/autofill/Session.java index f18d13d30da6..ff036ac30c48 100644 --- a/services/autofill/java/com/android/server/autofill/Session.java +++ b/services/autofill/java/com/android/server/autofill/Session.java @@ -1956,15 +1956,6 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState } } } - final AutofillId[] fieldClassificationIds = lastResponse.getFieldClassificationIds(); - - if (!hasAtLeastOneDataset && fieldClassificationIds == null) { - if (sVerbose) { - Slog.v(TAG, "logContextCommittedLocked(): skipped (no datasets nor fields " - + "classification ids)"); - } - return; - } for (int i = 0; i < mViewStates.size(); i++) { final ViewState viewState = mViewStates.valueAt(i); @@ -2013,6 +2004,7 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState } continue; } + // Check if value match a dataset. if (hasAtLeastOneDataset) { for (int j = 0; j < responseCount; j++) { @@ -2069,7 +2061,6 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState } // else } // for j } - } // else } // else } -- cgit v1.2.3-59-g8ed1b