Merge "[Autofill PCC Detection] Provide detection info during save." into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
8f50695085
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user