Merge "Stop to show fill dialog if IME is showing" into udc-dev
This commit is contained in:
@@ -1773,7 +1773,7 @@ public final class AutofillManager {
|
|||||||
mForAugmentedAutofillOnly = false;
|
mForAugmentedAutofillOnly = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((flags & FLAG_SUPPORTS_FILL_DIALOG) != 0 && view != null) {
|
if ((flags & FLAG_SUPPORTS_FILL_DIALOG) != 0) {
|
||||||
flags |= FLAG_RESET_FILL_DIALOG_STATE;
|
flags |= FLAG_RESET_FILL_DIALOG_STATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -206,4 +206,11 @@ final class AutofillInlineSessionController {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean isImeShowing() {
|
||||||
|
if (mSession != null) {
|
||||||
|
return mSession.isImeShowing();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,6 +106,8 @@ final class AutofillInlineSuggestionsRequestSession {
|
|||||||
@GuardedBy("mLock")
|
@GuardedBy("mLock")
|
||||||
private boolean mImeSessionInvalidated = false;
|
private boolean mImeSessionInvalidated = false;
|
||||||
|
|
||||||
|
private boolean mImeShowing = false;
|
||||||
|
|
||||||
AutofillInlineSuggestionsRequestSession(
|
AutofillInlineSuggestionsRequestSession(
|
||||||
@NonNull InputMethodManagerInternal inputMethodManagerInternal, int userId,
|
@NonNull InputMethodManagerInternal inputMethodManagerInternal, int userId,
|
||||||
@NonNull ComponentName componentName, @NonNull Handler handler, @NonNull Object lock,
|
@NonNull ComponentName componentName, @NonNull Handler handler, @NonNull Object lock,
|
||||||
@@ -320,6 +322,7 @@ final class AutofillInlineSuggestionsRequestSession {
|
|||||||
if (mDestroyed) {
|
if (mDestroyed) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
mImeShowing = imeInputViewStarted;
|
||||||
if (mImeCurrentFieldId != null) {
|
if (mImeCurrentFieldId != null) {
|
||||||
boolean imeInputStartedChanged = (mImeInputStarted != imeInputStarted);
|
boolean imeInputStartedChanged = (mImeInputStarted != imeInputStarted);
|
||||||
boolean imeInputViewStartedChanged = (mImeInputViewStarted != imeInputViewStarted);
|
boolean imeInputViewStartedChanged = (mImeInputViewStarted != imeInputViewStarted);
|
||||||
@@ -364,6 +367,12 @@ final class AutofillInlineSuggestionsRequestSession {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean isImeShowing() {
|
||||||
|
synchronized (mLock) {
|
||||||
|
return !mDestroyed && mImeShowing;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Internal implementation of {@link IInlineSuggestionsRequestCallback}.
|
* Internal implementation of {@link IInlineSuggestionsRequestCallback}.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -4365,6 +4365,12 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mInlineSessionController.isImeShowing()) {
|
||||||
|
// IME is showing, fallback to normal suggestions UI
|
||||||
|
// Note: only work when inline suggestions supported
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
synchronized (mLock) {
|
synchronized (mLock) {
|
||||||
if (mLastFillDialogTriggerIds == null
|
if (mLastFillDialogTriggerIds == null
|
||||||
|| !ArrayUtils.contains(mLastFillDialogTriggerIds, filledId)) {
|
|| !ArrayUtils.contains(mLastFillDialogTriggerIds, filledId)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user