summaryrefslogtreecommitdiff
path: root/services/autofill/java
diff options
context:
space:
mode:
authorAdam He <adamhe@google.com>2020-06-22 20:35:14 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-06-22 20:35:14 +0000
commitb58c5100ee70f284cae573a4388e6e3f03865175 (patch)
tree32d53f73df51fb1f777a5a09c1121a62cd594e47 /services/autofill/java
parent2359a78aaa722c7e5817012578f77729bb30ca62 (diff)
parent8dca7270f8c02ef0b0d7f331ae865a737203a133 (diff)
Merge "Add missing cases where empty suggestions should be sent to IME." into rvc-dev
Diffstat (limited to 'services/autofill/java')
-rw-r--r--services/autofill/java/com/android/server/autofill/Session.java17
1 files changed, 12 insertions, 5 deletions
diff --git a/services/autofill/java/com/android/server/autofill/Session.java b/services/autofill/java/com/android/server/autofill/Session.java
index 431e1440ddd3..2b9ce2f07c70 100644
--- a/services/autofill/java/com/android/server/autofill/Session.java
+++ b/services/autofill/java/com/android/server/autofill/Session.java
@@ -1005,6 +1005,10 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
|| disableDuration > 0) {
// Response is "empty" from an UI point of view, need to notify client.
notifyUnavailableToClient(sessionFinishedState, /* autofillableIds= */ null);
+ synchronized (mLock) {
+ mInlineSessionController.setInlineFillUiLocked(
+ InlineFillUi.emptyUi(mCurrentViewId));
+ }
}
if (requestLog != null) {
@@ -3166,12 +3170,15 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
notifyUnavailableToClient(AutofillManager.STATE_FINISHED, autofillableIds);
removeSelf();
} else {
- if (sVerbose) {
- if ((flags & FLAG_PASSWORD_INPUT_TYPE) != 0) {
+ if ((flags & FLAG_PASSWORD_INPUT_TYPE) != 0) {
+ if (sVerbose) {
Slog.v(TAG, "keeping session " + id + " when service returned null and "
+ "augmented service is disabled for password fields. "
+ "AutofillableIds: " + autofillableIds);
- } else {
+ }
+ mInlineSessionController.hideInlineSuggestionsUiLocked(mCurrentViewId);
+ } else {
+ if (sVerbose) {
Slog.v(TAG, "keeping session " + id + " when service returned null but "
+ "it can be augmented. AutofillableIds: " + autofillableIds);
}
@@ -3197,7 +3204,7 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
// non-null response but without datasets (for example, just SaveInfo)
@GuardedBy("mLock")
private Runnable triggerAugmentedAutofillLocked(int flags) {
- // (TODO: b/141703197) Fix later by passing info to service.
+ // TODO: (b/141703197) Fix later by passing info to service.
if ((flags & FLAG_PASSWORD_INPUT_TYPE) != 0) {
return null;
}
@@ -3242,7 +3249,7 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
+ ComponentName.flattenToShortString(mComponentName) + " not whitelisted ");
}
logAugmentedAutofillRequestLocked(mode, remoteService.getComponentName(),
- mCurrentViewId, isWhitelisted, /*isInline*/null);
+ mCurrentViewId, isWhitelisted, /* isInline= */ null);
return null;
}