Merge "Hide augmented inline suggestion if field value is changed to not empty" into rvc-dev
diff --git a/core/java/android/view/autofill/AutofillManager.java b/core/java/android/view/autofill/AutofillManager.java
index 83a7934..6d3dbfe 100644
--- a/core/java/android/view/autofill/AutofillManager.java
+++ b/core/java/android/view/autofill/AutofillManager.java
@@ -1258,13 +1258,6 @@
                 }
             }
 
-            if (mForAugmentedAutofillOnly) {
-                if (sVerbose) {
-                    Log.v(TAG,  "notifyValueChanged(): not notifying system server on "
-                            + "augmented-only mode");
-                }
-                return;
-            }
             if (!mEnabled || !isActiveLocked()) {
                 if (!startAutofillIfNeededLocked(view)) {
                     if (sVerbose) {
@@ -1299,10 +1292,6 @@
             return;
         }
         synchronized (mLock) {
-            if (mForAugmentedAutofillOnly) {
-                if (sVerbose) Log.v(TAG,  "notifyValueChanged(): ignoring on augmented only mode");
-                return;
-            }
             if (!mEnabled || !isActiveLocked()) {
                 if (sVerbose) {
                     Log.v(TAG, "notifyValueChanged(" + view.getAutofillId() + ":" + virtualId
diff --git a/services/autofill/java/com/android/server/autofill/Session.java b/services/autofill/java/com/android/server/autofill/Session.java
index 3d68618..9d1ad42 100644
--- a/services/autofill/java/com/android/server/autofill/Session.java
+++ b/services/autofill/java/com/android/server/autofill/Session.java
@@ -2653,6 +2653,11 @@
         } else if (viewState.id.equals(this.mCurrentViewId)
                 && (viewState.getState() & ViewState.STATE_INLINE_SHOWN) != 0) {
             requestShowInlineSuggestionsLocked(viewState.getResponse(), filterText);
+        } else if (viewState.id.equals(this.mCurrentViewId)
+                && (viewState.getState() & ViewState.STATE_TRIGGERED_AUGMENTED_AUTOFILL) != 0) {
+            if (!TextUtils.isEmpty(filterText)) {
+                mInlineSessionController.hideInlineSuggestionsUiLocked(mCurrentViewId);
+            }
         }
 
         viewState.setState(ViewState.STATE_CHANGED);