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

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

Issue 2110013003: Remove incorrect assert in PaymentRequest address editor UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorFieldModel.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/payments/AddressEditor.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/AddressEditor.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/AddressEditor.java
index 3d8949980c8bbf25dab5e5ee536ee4dd8c111ebe..57b69e173e2dbfcc75ed93a2b536c285f5934d4e 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/payments/AddressEditor.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/AddressEditor.java
@@ -123,10 +123,6 @@ public class AddressEditor extends EditorBase<AutofillAddress> {
AutofillProfileBridge.getSupportedCountries());
}
- // Country dropdown is cached, so the selected item needs to be updated for every new
- // profile that's being edited.
- mCountryField.setValue(AutofillAddress.getCountryCode(profile));
-
// Changing the country will update which fields are in the model. The actual fields are not
// discarded, so their contents are preserved.
mCountryField.setDropdownCallback(new Callback<Pair<String, Runnable>>() {
@@ -143,6 +139,10 @@ public class AddressEditor extends EditorBase<AutofillAddress> {
mHandler.post(eventData.second);
}
});
+
+ // Country dropdown is cached, so the selected item needs to be updated for the new profile
+ // that's being edited. This will not fire the dropdown callback.
+ mCountryField.setValue(AutofillAddress.getCountryCode(profile));
editor.addField(mCountryField);
// There's a finite number of fields for address editing. Changing the country will re-order
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorFieldModel.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698