Merge "Resolver/Chooser - Fix reuse of textview" into rvc-dev am: ab3811efea

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11914259

Change-Id: Ibedd489e4c91e8aea2e17ed1b5bb853587f15c6e
This commit is contained in:
TreeHugger Robot
2020-06-18 18:10:52 +00:00
committed by Automerger Merge Worker

View File

@@ -689,17 +689,17 @@ public class ResolverListAdapter extends BaseAdapter {
}
public void bindLabel(CharSequence label, CharSequence subLabel, boolean showSubLabel) {
if (!TextUtils.equals(text.getText(), label)) {
text.setText(label);
}
text.setText(label);
if (TextUtils.equals(label, subLabel)) {
subLabel = "";
subLabel = null;
}
if (showSubLabel || !TextUtils.equals(text2.getText(), subLabel)) {
text2.setText(subLabel);
if (showSubLabel || subLabel != null) {
text2.setVisibility(View.VISIBLE);
text2.setText(subLabel);
} else {
text2.setVisibility(View.GONE);
}
itemView.setContentDescription(null);