Commit bf6c27fb authored by Clemens Arbesser's avatar Clemens Arbesser Committed by Commit Bot

[Autofill Assistant] Disabled autofill overlay during payment requests,...

[Autofill Assistant] Disabled autofill overlay during payment requests, because payment requests have their own overlay.

Showing both overlays at the same time darkens the screen too much. However, the overlay color from autofill is different from that of the payment request. Even with this CL, there is a noticeable color change. We may want to adjust the color of our overlay to match that of the payment request.

Bug: 806868
Change-Id: I63929cef745e4a573b90f567429ee996eb556b64
Reviewed-on: https://chromium-review.googlesource.com/c/1311922
Commit-Queue: Clemens Arbesser <arbesser@google.com>
Reviewed-by: default avatarStephane Zermatten <szermatt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604602}
parent a08d814b
......@@ -249,17 +249,20 @@ public class AutofillAssistantUiController implements AutofillAssistantUiDelegat
mAutofillAssistantPaymentRequest = new AutofillAssistantPaymentRequest(
mWebContents, paymentOtions, title, supportedBasicCardNetworks);
mUiDelegateHolder.performUiOperation(
uiDelegate -> mAutofillAssistantPaymentRequest.show(selectedPaymentInformation -> {
nativeOnGetPaymentInformation(mUiControllerAndroid,
selectedPaymentInformation.succeed, selectedPaymentInformation.card,
selectedPaymentInformation.address,
selectedPaymentInformation.payerName,
selectedPaymentInformation.payerPhone,
selectedPaymentInformation.payerEmail);
mAutofillAssistantPaymentRequest.close();
mAutofillAssistantPaymentRequest = null;
}));
mUiDelegateHolder.performUiOperation(uiDelegate -> {
boolean overlayVisible = uiDelegate.isOverlayVisible();
if (overlayVisible) uiDelegate.hideOverlay();
mAutofillAssistantPaymentRequest.show(selectedPaymentInformation -> {
if (overlayVisible) uiDelegate.showOverlay();
nativeOnGetPaymentInformation(mUiControllerAndroid,
selectedPaymentInformation.succeed, selectedPaymentInformation.card,
selectedPaymentInformation.address, selectedPaymentInformation.payerName,
selectedPaymentInformation.payerPhone,
selectedPaymentInformation.payerEmail);
mAutofillAssistantPaymentRequest.close();
mAutofillAssistantPaymentRequest = null;
});
});
}
@CalledByNative
......
......@@ -367,6 +367,10 @@ class AutofillAssistantUiDelegate {
mOverlay.setVisibility(View.GONE);
}
public boolean isOverlayVisible() {
return mOverlay.getVisibility() == View.VISIBLE;
}
public void hideDetails() {
mDetails.setVisibility(View.GONE);
setCarouselTopPadding();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment