Commit 1dc71beb authored by siashah's avatar siashah Committed by Commit Bot

Disable the save button if name is empty

During the name fix flow, the cardholder name is empty at times (reason unknown,
but mostly because of sync)
In such a scenario, we should have the save card button on the dialog
disabled by default

Bug: 929421
Change-Id: I195422134a263bc201caec2059f4834f7476eb43
Reviewed-on: https://chromium-review.googlesource.com/c/1487144Reviewed-by: default avatarSebastien Seguin-Gagnon <sebsg@chromium.org>
Reviewed-by: default avatarJared Saul <jsaul@google.com>
Commit-Queue: Siddharth Shah <siashah@chromium.org>
Cr-Commit-Position: refs/heads/master@{#635617}
parent 5e8bbef7
......@@ -82,6 +82,8 @@ public class AutofillNameFixFlowPrompt implements TextWatcher, ModalDialogProper
.with(ModalDialogProperties.NEGATIVE_BUTTON_TEXT,
context.getResources(), R.string.cancel)
.with(ModalDialogProperties.CANCEL_ON_TOUCH_OUTSIDE, true)
.with(ModalDialogProperties.POSITIVE_BUTTON_DISABLED,
inferredName.isEmpty())
.build();
// Hitting the "submit" button on the software keyboard should submit.
......
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