Merge "Resend previous inline suggestions when IME hides and shows again" into rvc-dev am: 3a064c9f69
Change-Id: Ib86100e6f4622fd181162d888e4fcc428c1ef4d3
This commit is contained in:
@@ -39,6 +39,7 @@ import com.android.internal.view.InlineSuggestionsRequestInfo;
|
|||||||
import com.android.server.inputmethod.InputMethodManagerInternal;
|
import com.android.server.inputmethod.InputMethodManagerInternal;
|
||||||
|
|
||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
@@ -205,12 +206,9 @@ final class AutofillInlineSuggestionsRequestSession {
|
|||||||
// Although the inline suggestions should disappear when IME hides which removes them
|
// Although the inline suggestions should disappear when IME hides which removes them
|
||||||
// from the view hierarchy, but we still send an empty response to be extra safe.
|
// from the view hierarchy, but we still send an empty response to be extra safe.
|
||||||
|
|
||||||
// TODO(b/149945531): clear the existing suggestions when IME is hide, once the bug is
|
if (sDebug) Log.d(TAG, "Send empty inline response");
|
||||||
// fixed.
|
updateResponseToImeUncheckLocked(new InlineSuggestionsResponse(Collections.EMPTY_LIST));
|
||||||
//if (sDebug) Log.d(TAG, "Send empty inline response");
|
mPreviousResponseIsNotEmpty = false;
|
||||||
//updateResponseToImeUncheckLocked(new InlineSuggestionsResponse(Collections
|
|
||||||
// .EMPTY_LIST));
|
|
||||||
//mPreviousResponseIsNotEmpty = false;
|
|
||||||
} else if (mImeInputViewStarted && mInlineSuggestionsResponse != null && match(mAutofillId,
|
} else if (mImeInputViewStarted && mInlineSuggestionsResponse != null && match(mAutofillId,
|
||||||
mImeCurrentFieldId)) {
|
mImeCurrentFieldId)) {
|
||||||
// 2. if IME is visible, and response is not null, send the response
|
// 2. if IME is visible, and response is not null, send the response
|
||||||
@@ -224,9 +222,6 @@ final class AutofillInlineSuggestionsRequestSession {
|
|||||||
+ mInlineSuggestionsResponse.getInlineSuggestions().size());
|
+ mInlineSuggestionsResponse.getInlineSuggestions().size());
|
||||||
}
|
}
|
||||||
updateResponseToImeUncheckLocked(mInlineSuggestionsResponse);
|
updateResponseToImeUncheckLocked(mInlineSuggestionsResponse);
|
||||||
// TODO(b/149945531): don't set the response to null so it's cached, once the bug is
|
|
||||||
// fixed.
|
|
||||||
mInlineSuggestionsResponse = null;
|
|
||||||
mPreviousResponseIsNotEmpty = !isEmptyResponse;
|
mPreviousResponseIsNotEmpty = !isEmptyResponse;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user