diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-19 22:23:03 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-19 22:23:03 +0000 |
commit | 571d054e927eb1ba56947369a8d4077d74054f4b (patch) | |
tree | f142539fa8b968053f8962b913ef29a3d34c84fa /chrome/android/java | |
parent | b6f3c3625fed89feb161461657082157e72e21ef (diff) | |
download | chromium_src-571d054e927eb1ba56947369a8d4077d74054f4b.zip chromium_src-571d054e927eb1ba56947369a8d4077d74054f4b.tar.gz chromium_src-571d054e927eb1ba56947369a8d4077d74054f4b.tar.bz2 |
Remove "Use billing for shipping" checkbox in favor of item in suggestions menu.
BUG=225093
Review URL: https://codereview.chromium.org/14129005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195316 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/android/java')
3 files changed, 9 insertions, 40 deletions
diff --git a/chrome/android/java/res/layout/autofill_general_layout.xml b/chrome/android/java/res/layout/autofill_general_layout.xml index cbc4080a..6e80dcd 100644 --- a/chrome/android/java/res/layout/autofill_general_layout.xml +++ b/chrome/android/java/res/layout/autofill_general_layout.xml @@ -90,12 +90,6 @@ <Space android:layout_gravity="fill" android:layout_columnSpan="2"/> - <CheckBox - android:id="@+id/use_billing_checkbox" - android:padding="@dimen/autofill_steady_margin" - android:textSize="@dimen/autofill_notification_text_size" - android:layout_gravity="fill_horizontal" - android:layout_columnSpan="4"/> <Spinner android:layout_margin="@dimen/autofill_steady_margin" android:id="@+id/address_spinner" diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillDialog.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillDialog.java index aba8753..f9c42ec 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillDialog.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillDialog.java @@ -156,7 +156,7 @@ public class AutofillDialog extends AlertDialog } protected AutofillDialog(Context context, AutofillDialogDelegate delegate, - String useBillingForShippingText, String saveLocallyText) { + String saveLocallyText) { super(context); getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE); mDelegate = delegate; @@ -170,9 +170,6 @@ public class AutofillDialog extends AlertDialog inflate(R.layout.autofill_dialog_content, null); mContentView.setAutofillDialog(this); - CheckBox useBillingCheck = getUseBillingForShippingCheckBox(); - useBillingCheck.setText(useBillingForShippingText); - useBillingCheck.setChecked(true); getSaveLocallyCheckBox().setText(saveLocallyText); String[] labels = new String[AutofillDialogConstants.NUM_SECTIONS]; @@ -308,9 +305,6 @@ public class AutofillDialog extends AlertDialog } mDelegate.editingStart(section); - if (section == AutofillDialogConstants.SECTION_SHIPPING) { - getUseBillingForShippingCheckBox().setChecked(false); - } AutofillDialogMenuItem currentItem = (AutofillDialogMenuItem) spinner.getItemAtPosition(position); if (currentItem.mIndex == ADD_MENU_ITEM_INDEX) { @@ -324,10 +318,6 @@ public class AutofillDialog extends AlertDialog public void onNothingSelected(AdapterView<?> spinner) { } - private CheckBox getUseBillingForShippingCheckBox() { - return (CheckBox) mContentView.findViewById(R.id.use_billing_checkbox); - } - /** * @param spinner The dropdown that was selected by the user. * @param section The section that the dropdown corresponds to. @@ -456,10 +446,11 @@ public class AutofillDialog extends AlertDialog combinedItems = Arrays.asList(menuItems); } else { combinedItems = new ArrayList<AutofillDialogMenuItem>( - menuItems.length - 1 + mDefaultMenuItems[section].length); + menuItems.length - 2 + mDefaultMenuItems[section].length); combinedItems.addAll(Arrays.asList(menuItems)); - // Replace the provided "Add... item with ours and add "Edit". - combinedItems.remove(menuItems.length - 1); + // Replace the provided "Add..." item with ours and add "Edit". + // Also remove the "Manage..." item (for now). + combinedItems.remove(menuItems.length - 2); combinedItems.addAll(Arrays.asList(mDefaultMenuItems[section])); } @@ -558,13 +549,6 @@ public class AutofillDialog extends AlertDialog } /** - * @return Whether the billing address should be used as shipping address. - */ - public boolean shouldUseBillingForShipping() { - return getUseBillingForShippingCheckBox().isChecked(); - } - - /** * @return Whether the details entered should be saved locally on the device. */ public boolean shouldSaveDetailsLocally() { diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillDialogGlue.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillDialogGlue.java index 7423e3f..b3c8bba 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillDialogGlue.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillDialogGlue.java @@ -23,21 +23,20 @@ public class AutofillDialogGlue implements AutofillDialogDelegate, private final AutofillDialogAccountHelper mAccountHelper; public AutofillDialogGlue(int nativeAutofillDialogViewAndroid, WindowAndroid nativeWindow, - String useBillingForShippingText, String saveLocallyText) { + String saveLocallyText) { mNativeDialogPopup = nativeAutofillDialogViewAndroid; mAccountHelper = new AutofillDialogAccountHelper(this, nativeWindow.getContext()); - mAutofillDialog = new AutofillDialog( - nativeWindow.getContext(), this, useBillingForShippingText, saveLocallyText); + mAutofillDialog = new AutofillDialog(nativeWindow.getContext(), this, saveLocallyText); mAutofillDialog.show(); } @CalledByNative private static AutofillDialogGlue create(int nativeAutofillDialogViewAndroid, WindowAndroid nativeWindow, - String useBillingForShippingText, String saveLocallyText) { + String saveLocallyText) { return new AutofillDialogGlue(nativeAutofillDialogViewAndroid, nativeWindow, - useBillingForShippingText, saveLocallyText); + saveLocallyText); } /** @@ -99,14 +98,6 @@ public class AutofillDialogGlue implements AutofillDialogDelegate, } /** - * @see AutofillDialog#shouldUseBillingForShipping() - */ - @CalledByNative - private boolean shouldUseBillingForShipping() { - return mAutofillDialog.shouldUseBillingForShipping(); - } - - /** * @see AutofillDialog#shouldSaveDetailsLocally() */ @CalledByNative |