| Index: chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillDialogUtils.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillDialogUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillDialogUtils.java
|
| index 7c307471c918b585d15b6bc50b412d7dbeab294b..426551a256d2f6abc8d4d68e282a22bf43e67536 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillDialogUtils.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillDialogUtils.java
|
| @@ -24,8 +24,7 @@ public class AutofillDialogUtils {
|
| }
|
|
|
| /**
|
| - * Returns the {@link Spinner} ID for the given section in the AutofillDialog
|
| - * layout
|
| + * Returns the {@link Spinner} ID for the given section in the AutofillDialog layout.
|
| * @param section The section to return the spinner ID for.
|
| * @return The Android ID for the spinner dropdown for the given section.
|
| */
|
| @@ -48,6 +47,29 @@ public class AutofillDialogUtils {
|
| }
|
|
|
| /**
|
| + * Returns the autofill menu item layout ID for the given section in the AutofillDialog layout.
|
| + * @param section The section to return the item layout ID for.
|
| + * @return The Android ID for the autofill menu item layout for the given section.
|
| + */
|
| + public static int getItemLayoutIDForSection(int section) {
|
| + switch (section) {
|
| + case AutofillDialogConstants.SECTION_CC :
|
| + return R.layout.autofill_menu_item;
|
| + case AutofillDialogConstants.SECTION_CC_BILLING :
|
| + return R.layout.autofill_menu_item;
|
| + case AutofillDialogConstants.SECTION_SHIPPING :
|
| + return R.layout.autofill_simple_menu_item;
|
| + case AutofillDialogConstants.SECTION_BILLING :
|
| + return R.layout.autofill_simple_menu_item;
|
| + case AutofillDialogConstants.SECTION_EMAIL :
|
| + return R.layout.autofill_simple_menu_item;
|
| + default:
|
| + assert(false);
|
| + return INVALID_ID;
|
| + }
|
| + }
|
| +
|
| + /**
|
| * Returns the section that has a spinner with the given id.
|
| * @param id The Android ID to look up.
|
| * @return The section with a spinner with the given ID.
|
|
|