From abe54cbf0c09f40f9a8f95d8063326bf9b83da19 Mon Sep 17 00:00:00 2001 From: Felipe Leme Date: Thu, 6 Apr 2017 13:27:52 -0700 Subject: [PATCH] Don't start a partition when session is pending FillResponse authentication. BUG: 35707731 Test: fixed testFillResponseAuthBothFields and testFillResponseAuthJustOneField Change-Id: Ib74e46dd37feb7e5c03e40cfbe8133ace6db0709 --- .../autofill/java/com/android/server/autofill/Session.java | 7 +++++++ .../java/com/android/server/autofill/ViewState.java | 2 ++ 2 files changed, 9 insertions(+) diff --git a/services/autofill/java/com/android/server/autofill/Session.java b/services/autofill/java/com/android/server/autofill/Session.java index a3da50e9aaea9..1c4b206db5521 100644 --- a/services/autofill/java/com/android/server/autofill/Session.java +++ b/services/autofill/java/com/android/server/autofill/Session.java @@ -595,6 +595,13 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState } private ViewState startPartitionLocked(AutofillId id, AutofillValue value) { + // TODO(b/33197203 , b/35707731): temporary workaround until partitioning supports auth + if (mResponseWaitingAuth != null) { + final ViewState viewState = + new ViewState(this, id, value, this, ViewState.STATE_WAITING_RESPONSE_AUTH); + mViewStates.put(id, viewState); + return viewState; + } if (DEBUG) { Slog.d(TAG, "Starting partition for view id " + id); } diff --git a/services/autofill/java/com/android/server/autofill/ViewState.java b/services/autofill/java/com/android/server/autofill/ViewState.java index f8919eeb060bc..ea5f1137568c9 100644 --- a/services/autofill/java/com/android/server/autofill/ViewState.java +++ b/services/autofill/java/com/android/server/autofill/ViewState.java @@ -61,6 +61,8 @@ final class ViewState { public static final int STATE_STARTED_PARTITION = 0x20; /** User select a dataset in this view, but service must authenticate first. */ public static final int STATE_WAITING_DATASET_AUTH = 0x40; + // TODO(b/33197203 , b/35707731): temporary workaround until partitioning supports auth + public static final int STATE_WAITING_RESPONSE_AUTH = 0x80; public final AutofillId id; private final Listener mListener;