| Index: chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentOption.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentOption.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentOption.java
|
| index 6b0356a9ad0cbeb33873c1fb3ad4a689d55bbe7e..c57bdedad09b0c8ab3455d0982435b1e05a58fce 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentOption.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentOption.java
|
| @@ -15,19 +15,19 @@
|
| public static final int NO_ICON = 0;
|
|
|
| protected boolean mIsComplete;
|
| - private String mId;
|
| + private final String mId;
|
| + private final int mIcon;
|
| @Nullable private String mLabel;
|
| @Nullable private String mSublabel;
|
| - private int mIcon;
|
| private boolean mIsValid = true;
|
|
|
| /**
|
| * Constructs a payment option.
|
| *
|
| - * @param id The identifier.
|
| - * @param label The label.
|
| + * @param id The identifier.
|
| + * @param label The label.
|
| * @param sublabel The optional sublabel.
|
| - * @param icon The drawable icon identifier or NO_ICON.
|
| + * @param icon The drawable icon identifier or NO_ICON.
|
| */
|
| public PaymentOption(String id, @Nullable String label, @Nullable String sublabel, int icon) {
|
| mId = id;
|
| @@ -64,37 +64,19 @@
|
| }
|
|
|
| /**
|
| - * Updates the identifier, label, and sublabel of this option. Called after the user has edited
|
| - * this option.
|
| + * Updates the label and sublabel of this option. Called after the user has edited this option.
|
| *
|
| - * @param id The new id to use. Should not be null.
|
| * @param label The new label to use. Should not be null.
|
| * @param sublabel The new sublabel to use. Can be null.
|
| */
|
| - protected void updateIdentifierAndLabels(String id, String label, @Nullable String sublabel) {
|
| - updateIdentifierLabelsAndIcon(id, label, sublabel, mIcon);
|
| + protected void updateLabels(String label, @Nullable String sublabel) {
|
| + mLabel = label;
|
| + mSublabel = sublabel;
|
| }
|
|
|
| /**
|
| - * Updates the identifier, label, sublabel, and icon of this option. Called after the user has
|
| - * edited this option.
|
| - *
|
| - * @param id The new id to use. Should not be null.
|
| - * @param label The new label to use. Should not be null.
|
| - * @param sublabel The new sublabel to use. Can be null.
|
| - * @param icon The drawable icon identifier or NO_ICON.
|
| - */
|
| - protected void updateIdentifierLabelsAndIcon(
|
| - String id, String label, @Nullable String sublabel, int icon) {
|
| - mId = id;
|
| - mLabel = label;
|
| - mSublabel = sublabel;
|
| - mIcon = icon;
|
| - }
|
| -
|
| - /**
|
| - * The identifier for the drawable icon for this payment option. For example, R.drawable.pr_visa
|
| - * or NO_ICON.
|
| + * The identifier for the drawable icon for this payment option. For example,
|
| + * R.drawable.visa_card_issuer_icon or NO_ICON.
|
| */
|
| public int getDrawableIconId() {
|
| return mIcon;
|
|
|