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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillPopup.java

Issue 11778043: Cleaning up Android's Autofill call suggestionSelected. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing the test Created 7 years, 11 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/autofill/AutofillPopupGlue.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/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 a4733c6d053fdfdbed56af3867de98e9642b5cca..7fed2994b132c2275c269920b677ab6e7c855108 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
@@ -64,10 +64,8 @@ public class AutofillPopup extends ListPopupWindow implements AdapterView.OnItem
/**
* Handles the selection of an Autofill suggestion from an AutofillPopup.
* @param listIndex The index of the selected Autofill suggestion.
- * @param value The value of the selected Autofill suggestion.
- * @param uniqueId The unique id of the selected Autofill suggestion.
*/
- public void suggestionSelected(int listIndex, String value, int uniqueId);
+ public void suggestionSelected(int listIndex);
}
// ListPopupWindow needs an anchor view to determine it's size and position. We create a view
@@ -223,14 +221,7 @@ public class AutofillPopup extends ListPopupWindow implements AdapterView.OnItem
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
- try {
- ListAdapter adapter = (ListAdapter) parent.getAdapter();
- AutofillSuggestion data = (AutofillSuggestion) adapter.getItem(position);
- mAutofillCallback.suggestionSelected(position, data.mName, data.mUniqueId);
- } catch (ClassCastException e) {
- Log.w("AutofillWindow", "error in onItemClick", e);
- assert false;
- }
+ mAutofillCallback.suggestionSelected(position);
}
}
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillPopupGlue.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698