| Index: chrome/android/java/src/org/chromium/chrome/browser/ItemChooserDialog.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ItemChooserDialog.java b/chrome/android/java/src/org/chromium/chrome/browser/ItemChooserDialog.java
|
| index 8bc1b337d3c5ab94c9bcf63c915de9eedba9ea8c..de66ec66cdf23e9b92b828f648299dc4e972c86e 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/ItemChooserDialog.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/ItemChooserDialog.java
|
| @@ -68,12 +68,10 @@ public class ItemChooserDialog {
|
| */
|
| public static class ItemChooserRowIcon {
|
| private final Drawable mIcon;
|
| - private final Drawable mSelected;
|
| private final String mDescription;
|
|
|
| - public ItemChooserRowIcon(Drawable icon, Drawable selectedIcon, String iconDescription) {
|
| + public ItemChooserRowIcon(Drawable icon, String iconDescription) {
|
| mIcon = icon;
|
| - mSelected = selectedIcon;
|
| mDescription = iconDescription;
|
| }
|
|
|
| @@ -85,7 +83,6 @@ public class ItemChooserDialog {
|
| ItemChooserRowIcon otherIcon = (ItemChooserRowIcon) other;
|
|
|
| if (!mIcon.equals(otherIcon.mIcon)) return false;
|
| - if (!mSelected.equals(otherIcon.mSelected)) return false;
|
| if (!TextUtils.equals(mDescription, otherIcon.mDescription)) return false;
|
|
|
| return true;
|
| @@ -368,8 +365,9 @@ public class ItemChooserDialog {
|
| ItemChooserRowIcon icon = getItem(position).mIcon;
|
| if (icon != null) {
|
| row.mImageView.setContentDescription(icon.mDescription);
|
| - row.mImageView.setImageDrawable(
|
| - (mSelectedItem == position) ? icon.mSelected : icon.mIcon);
|
| + // Need to set the drawable to null first otherwise the drawable's
|
| + // state doesn't get updated for some reason.
|
| + row.mImageView.setImageDrawable(icon.mIcon);
|
| row.mImageView.setVisibility(View.VISIBLE);
|
| } else {
|
| row.mImageView.setVisibility(View.INVISIBLE);
|
| @@ -393,7 +391,6 @@ public class ItemChooserDialog {
|
| public void onItemClick(AdapterView<?> adapter, View view, int position, long id) {
|
| mSelectedItem = position;
|
| mConfirmButton.setEnabled(true);
|
| - notifyDataSetChanged();
|
| }
|
|
|
| private void addToDescriptionsMap(String description) {
|
|
|