Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1252)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/payments/ui/SectionInformation.java

Issue 2081533002: Edit contacts UI for PaymentRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@contactDetails
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..d8f77a458a7073d7d227442815e5787febb56dba 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,15 @@ public class SectionInformation {
}
/**
+ * Adds and selects the given item.
gone 2016/06/21 06:04:39 Indicate that it's added at the head of the list.
please use gerrit instead 2016/06/22 02:12:31 Done.
+ */
+ 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.

Powered by Google App Engine
This is Rietveld 408576698