Index: chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillPopup.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillPopup.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillPopup.java |
index 22e469fe4707021972fe65a4e6faf8f7b4f93e90..710c5c0982f9b1945ecc5ef1a8d89a294db4db8a 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillPopup.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillPopup.java |
@@ -30,6 +30,13 @@ import org.chromium.ui.gfx.NativeWindow; |
*/ |
public class AutofillPopup extends ListPopupWindow implements AdapterView.OnItemClickListener { |
+ /** |
+ * Constants defining types of Autofill suggestion entries. |
+ * Has to be kept in sync with enum in WebAutofillClient.h |
+ */ |
+ private static final int ITEM_ID_AUTOCOMPLETE_ENTRY = 0; |
+ private static final int ITEM_ID_PASSWORD_ENTRY = -2; |
Ilya Sherman
2012/12/03 23:27:17
How come this doesn't include the other ids from W
aurimas (slooooooooow)
2012/12/04 02:05:00
Done.
|
+ |
private static final int TEXT_PADDING_DP = 30; |
private final AutofillPopupDelegate mAutofillCallback; |
@@ -129,7 +136,11 @@ public class AutofillPopup extends ListPopupWindow implements AdapterView.OnItem |
// Remove the AutofillSuggestions with IDs that are unsupported by Android |
ArrayList<AutofillSuggestion> cleanedData = new ArrayList<AutofillSuggestion>(); |
for (int i = 0; i < suggestions.length; i++) { |
- if (suggestions[i].mUniqueId >= 0) cleanedData.add(suggestions[i]); |
+ int itemId = suggestions[i].mUniqueId; |
+ if (itemId > 0 || itemId == ITEM_ID_AUTOCOMPLETE_ENTRY || |
Ted C
2012/12/01 00:02:23
should this be >= 0 like before?
aurimas (slooooooooow)
2012/12/04 02:05:00
Done.
|
+ itemId == ITEM_ID_PASSWORD_ENTRY) { |
+ cleanedData.add(suggestions[i]); |
+ } |
} |
mAnchorView.setSize(mAnchorRect, getDesiredWidth(suggestions)); |
setAnchorView(mAnchorView); |