| Index: chrome/android/java/src/org/chromium/chrome/browser/payments/ui/SectionInformation.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/SectionInformation.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/SectionInformation.java
|
| index ff95deffed18a64ff83ea7921a4abd5c342af9cc..14e6909f497ff56420ee29f179d020230332914d 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/SectionInformation.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/SectionInformation.java
|
| @@ -28,7 +28,7 @@ public class SectionInformation {
|
| public static final int INVALID_SELECTION = -2;
|
|
|
| @PaymentRequestUI.DataType private final int mDataType;
|
| - private final ArrayList<PaymentOption> mItems;
|
| + private ArrayList<PaymentOption> mItems;
|
| private int mSelectedItem;
|
|
|
| /**
|
| @@ -148,6 +148,17 @@ public class SectionInformation {
|
| }
|
|
|
| /**
|
| + * Adds the given item at the head of the list and selects it.
|
| + *
|
| + * @param item The item to add.
|
| + */
|
| + public void addAndSelectItem(PaymentOption item) {
|
| + if (mItems == null) mItems = new ArrayList<>();
|
| + mItems.add(0, item);
|
| + mSelectedItem = 0;
|
| + }
|
| +
|
| + /**
|
| * Returns the resource ID for the string telling users that they can add a new option.
|
| *
|
| * @return ID if the user can add a new option, or 0 if they can't.
|
|
|