Merge "Fix discovered logging issues for Autofill." into udc-dev am: 691b6c2963

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23123667

Change-Id: If8db9637a7babc41029254a332239f891a5703bd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Jiewen Lei
2023-05-12 21:53:29 +00:00
committed by Automerger Merge Worker
2 changed files with 2 additions and 4 deletions

View File

@@ -74,9 +74,6 @@ public final class FillRequestEventLogger {
public static final int TRIGGER_REASON_SERVED_FROM_CACHED_RESPONSE =
AUTOFILL_FILL_REQUEST_REPORTED__REQUEST_TRIGGER_REASON__TRIGGER_REASON_SERVED_FROM_CACHED_RESPONSE;
// Augmented autofill currently doesn't have an assigned request_id, use -2 as the magic number.
public static final int AUGMENTED_AUTOFILL_REQUEST_ID = -2;
private final int mSessionId;
private Optional<FillRequestEventInternal> mEventInternal;

View File

@@ -1158,7 +1158,7 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
}
mSessionFlags.mAugmentedAutofillOnly = true;
mFillRequestEventLogger.maybeSetRequestId(AUGMENTED_AUTOFILL_REQUEST_ID);
mFillRequestEventLogger.maybeSetIsAugmented(mSessionFlags.mAugmentedAutofillOnly);
mFillRequestEventLogger.maybeSetIsAugmented(true);
mFillRequestEventLogger.logAndEndEvent();
triggerAugmentedAutofillLocked(flags);
return;
@@ -4818,6 +4818,7 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
mFillRequestEventLogger.maybeSetAppPackageUid(uid);
mFillRequestEventLogger.maybeSetFlags(mFlags);
mFillRequestEventLogger.maybeSetRequestId(AUGMENTED_AUTOFILL_REQUEST_ID);
mFillRequestEventLogger.maybeSetIsAugmented(true);
mFillRequestEventLogger.logAndEndEvent();
final ViewState viewState = mViewStates.get(mCurrentViewId);