Allow for multiple call icons in the call log.
This commit adds support for having multiple call icons on a single
entry, to handle group entries.
When the group is represented as text, we currently use only the first
call type, but, in a follow-up, I will use an additional counter.
Change-Id: Iaa9d1c84eb926c1500bf0a439d45ce59314bd198
diff --git a/src/com/android/contacts/PhoneCallDetails.java b/src/com/android/contacts/PhoneCallDetails.java
index c5c37df..7b02a88 100644
--- a/src/com/android/contacts/PhoneCallDetails.java
+++ b/src/com/android/contacts/PhoneCallDetails.java
@@ -27,8 +27,12 @@
public final CharSequence number;
/** The formatted version of {@link #number}. */
public final CharSequence formattedNumber;
- /** The type of call, as defined in the call log table, e.g., {@link Calls#INCOMING_TYPE}. */
- public final int callType;
+ /**
+ * The type of calls, as defined in the call log table, e.g., {@link Calls#INCOMING_TYPE}.
+ * <p>
+ * There might be multiple types if this represents a set of entries grouped together.
+ */
+ public final int[] callTypes;
/** The date of the call, in milliseconds since the epoch. */
public final long date;
/** The name of the contact, or the empty string. */
@@ -39,17 +43,17 @@
public final CharSequence numberLabel;
/** Create the details for a call with a number not associated with a contact. */
- public PhoneCallDetails(CharSequence number, CharSequence formattedNumber, int callType,
+ public PhoneCallDetails(CharSequence number, CharSequence formattedNumber, int[] callTypes,
long date) {
- this(number, formattedNumber, callType, date, "", 0, "");
+ this(number, formattedNumber, callTypes, date, "", 0, "");
}
/** Create the details for a call with a number associated with a contact. */
- public PhoneCallDetails(CharSequence number, CharSequence formattedNumber, int callType,
+ public PhoneCallDetails(CharSequence number, CharSequence formattedNumber, int[] callTypes,
long date, CharSequence name, int numberType, CharSequence numberLabel) {
this.number = number;
this.formattedNumber = formattedNumber;
- this.callType = callType;
+ this.callTypes = callTypes;
this.date = date;
this.name = name;
this.numberType = numberType;