diff options
author | Nancy Chen <nancychen@google.com> | 2015-10-02 11:02:11 -0700 |
---|---|---|
committer | Nancy Chen <nancychen@google.com> | 2015-10-02 11:02:11 -0700 |
commit | fc603065a369e9e5c88f7307cedb0b33af5ee60c (patch) | |
tree | 8d841cb8d567aad64eb7af0e5fda30927088d7ef /InCallUI | |
parent | 9e16a9de6e5f6300ca67c266f0f7ad4eb562db02 (diff) |
Addressing comments in ag/777742.
Submitted pre-maturely, addressing comments in previous CL.
Bug: 23351559
Change-Id: Ieb0932268b98626811956c3f90e8050e1abe445a
Diffstat (limited to 'InCallUI')
-rw-r--r-- | InCallUI/src/com/android/incallui/InCallContactInteractions.java | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/InCallUI/src/com/android/incallui/InCallContactInteractions.java b/InCallUI/src/com/android/incallui/InCallContactInteractions.java index c1af44b9b..0ed8b2012 100644 --- a/InCallUI/src/com/android/incallui/InCallContactInteractions.java +++ b/InCallUI/src/com/android/incallui/InCallContactInteractions.java @@ -85,26 +85,16 @@ public class InCallContactInteractions { } public static abstract class ContactContextInfo { - Context mContext; - - public ContactContextInfo(Context context) { - mContext = context; - } - - public abstract void setListView(View listItem); + public abstract void bindView(View listItem); } public static class BusinessContextInfo extends ContactContextInfo { - public BusinessContextInfo(Context context) { - super(context); - } - int iconId; String heading; String detail; @Override - public void setListView(View listItem) { + public void bindView(View listItem) { ImageView imageView = (ImageView) listItem.findViewById(R.id.icon); TextView headingTextView = (TextView) listItem.findViewById(R.id.heading); TextView detailTextView = (TextView) listItem.findViewById(R.id.detail); @@ -113,7 +103,7 @@ public class InCallContactInteractions { return; } - imageView.setImageDrawable(mContext.getDrawable(this.iconId)); + imageView.setImageDrawable(listItem.getContext().getDrawable(this.iconId)); headingTextView.setText(this.heading); detailTextView.setText(this.detail); } @@ -124,12 +114,8 @@ public class InCallContactInteractions { String message; String detail; - public PersonContextInfo(Context context) { - super(context); - } - @Override - public void setListView(View listItem) { + public void bindView(View listItem) { TextView messageTextView = (TextView) listItem.findViewById(R.id.message); TextView detailTextView = (TextView) listItem.findViewById(R.id.detail); @@ -180,7 +166,7 @@ public class InCallContactInteractions { return listItem; } - item.setListView(listItem); + item.bindView(listItem); return listItem; } |