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

Commit 815f6819 authored by Simranjit Kohli's avatar Simranjit Kohli Committed by Automerger Merge Worker
Browse files

Merge "[Autofill PCC Detection] Provide detection info during save." into...

Merge "[Autofill PCC Detection] Provide detection info during save." into udc-dev am: 8f506950 am: 16912799

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



Change-Id: I6b0d97191c2a75e48e6e66777b30a0ca74d31a45
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 41654c33 16912799
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -225,6 +225,7 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
    private static final String EXTRA_REQUEST_ID = "android.service.autofill.extra.REQUEST_ID";

    private static final String PCC_HINTS_DELIMITER = ",";
    public static final String EXTRA_KEY_DETECTIONS = "detections";

    final Object mLock;

@@ -3653,6 +3654,17 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState

        final ArrayList<FillContext> contexts = mergePreviousSessionLocked( /* forSave= */ true);

        FieldClassificationResponse fieldClassificationResponse =
                mClassificationState.mLastFieldClassificationResponse;
        if (mService.isPccClassificationEnabled()
                && fieldClassificationResponse != null
                && !fieldClassificationResponse.getClassifications().isEmpty()) {
            if (mClientState == null) {
                mClientState = new Bundle();
            }
            mClientState.putParcelableArrayList(EXTRA_KEY_DETECTIONS, new ArrayList<>(
                    fieldClassificationResponse.getClassifications()));
        }
        final SaveRequest saveRequest =
                new SaveRequest(contexts, mClientState, mSelectedDatasetIds);
        mRemoteFillService.onSaveRequest(saveRequest);