Commit 3f0257f6 authored by Elizabeth Popova's avatar Elizabeth Popova Committed by Commit Bot

[Android] Remove unused value from AddressEditor.Purpose enum

AddressEditor.Purpose.AUTOFILL_ASSISTANT is defined but no longer used. Now autofill assistant uses AddressEditor.Purpose.PAYMENT_REQUEST, see [1].

[1]https://source.chromium.org/chromium/chromium/src/+/master:chrome/android/features/autofill_assistant/java/src/org/chromium/chrome/browser/autofill_assistant/user_data/AssistantCollectUserDataBinder.java;l=672

Change-Id: Idb67ca782c7c9f28d24e3bda722ac31d2f77a736
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2489994Reviewed-by: default avatarRouslan Solomakhin <rouslan@chromium.org>
Reviewed-by: default avatarChristoph Schwering <schwering@google.com>
Commit-Queue: Elizabeth Popova <lizapopova@google.com>
Cr-Commit-Position: refs/heads/master@{#819829}
parent ea5439ac
......@@ -42,12 +42,11 @@ import java.util.UUID;
*/
public class AddressEditor
extends EditorBase<AutofillAddress> implements GetSubKeysRequestDelegate {
@IntDef({Purpose.PAYMENT_REQUEST, Purpose.AUTOFILL_SETTINGS, Purpose.AUTOFILL_ASSISTANT})
@IntDef({Purpose.PAYMENT_REQUEST, Purpose.AUTOFILL_SETTINGS})
@Retention(RetentionPolicy.SOURCE)
public @interface Purpose {
int PAYMENT_REQUEST = 1;
int AUTOFILL_SETTINGS = 2;
int AUTOFILL_ASSISTANT = 3;
}
private final Handler mHandler = new Handler();
......@@ -80,8 +79,8 @@ public class AddressEditor
/**
* Builds an address editor.
*
* @param purpose The purpose of this address editor. One of Purpose.PAYMENT_REQUEST,
* Purpose.AUTOFILL_SETTINGS, or Purpose.AUTOFILL_ASSISTANT.
* @param purpose The purpose of this address editor. One of
* Purpose.PAYMENT_REQUEST or Purpose.AUTOFILL_SETTINGS.
* @param saveToDisk Whether to save changes to disk after editing.
*/
public AddressEditor(@Purpose int purpose, boolean saveToDisk) {
......@@ -157,6 +156,7 @@ public class AddressEditor
* [ an address field ] /
* [ an address field ] /
* [ phone number field ] <----- phone is always present and required.
* [ email address field ] <----- only present if purpose is Purpose.AUTOFILL_SETTINGS.
*/
@Override
public void edit(@Nullable final AutofillAddress toEdit,
......@@ -263,8 +263,8 @@ public class AddressEditor
// that's being edited.
mPhoneField.setValue(mProfile.getPhoneNumber());
// Email address is present for autofill settings and autofill assistant.
if (mPurpose != Purpose.PAYMENT_REQUEST) {
// Email address is present only for autofill settings.
if (mPurpose == Purpose.AUTOFILL_SETTINGS) {
if (mEmailField == null) {
mEmailField = EditorFieldModel.createTextInput(
EditorFieldModel.INPUT_TYPE_HINT_EMAIL,
......
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