diff options
author | Tyler Gunn <tgunn@google.com> | 2014-05-05 16:51:42 -0700 |
---|---|---|
committer | Tyler Gunn <tgunn@google.com> | 2014-05-05 16:51:42 -0700 |
commit | 146a4cdf57f0d4d0cd85e808f1df2bdea639b24c (patch) | |
tree | d318df168ae3e983371ea049517ad5b301aaa587 /src/com/android/dialer/calllog/CallLogListItemViews.java | |
parent | 92eb68d21bcdfa8e7d868e80b4af5c50f749cd23 (diff) |
Adding support for expandable call log entries.
Bug: 13962594
Change-Id: I19a4a65dce922619df0a709293ca291c345c8be7
Diffstat (limited to 'src/com/android/dialer/calllog/CallLogListItemViews.java')
-rw-r--r-- | src/com/android/dialer/calllog/CallLogListItemViews.java | 64 |
1 files changed, 51 insertions, 13 deletions
diff --git a/src/com/android/dialer/calllog/CallLogListItemViews.java b/src/com/android/dialer/calllog/CallLogListItemViews.java index a3789569e..879647f15 100644 --- a/src/com/android/dialer/calllog/CallLogListItemViews.java +++ b/src/com/android/dialer/calllog/CallLogListItemViews.java @@ -34,25 +34,67 @@ public final class CallLogListItemViews { public final QuickContactBadge quickContactView; /** The primary action view of the entry. */ public final View primaryActionView; - /** The secondary action view, which includes both the vertical divider line and - * the action button itself. Used so that the button and divider line can be - * made visible/hidden as a whole. */ - public final View secondaryActionView; - /** The secondary action button on the entry. */ - public final ImageView secondaryActionButtonView; /** The details of the phone call. */ public final PhoneCallDetailsViews phoneCallDetailsViews; /** The text of the header of a section. */ public final TextView listHeaderTextView; + /** The view containing call log item actions. Null until the ViewStub is inflated. */ + public View actionsView; + /** The "call back" action button - assigned only when the action section is expanded. */ + public TextView callBackButtonView; + /** The "delete" action button - assigned only when the action section is expanded. */ + public TextView deleteButtonView; + /** The "voicemail" action button - assigned only when the action section is expanded. */ + public TextView voicemailButtonView; + + /** + * The row Id for the first call associated with the call log entry. Used as a key for the + * map used to track which call log entries have the action button section expanded. + */ + public long rowId; + + /** + * The call Ids for the calls represented by the current call log entry. Used when the user + * deletes a call log entry. + */ + public long[] callIds; + + /** + * The callable phone number for the current call log entry. Cached here as the call back + * intent is set only when the actions ViewStub is inflated. + */ + public String number; + + /** + * The phone number presentation for the current call log entry. Cached here as the call back + * intent is set only when the actions ViewStub is inflated. + */ + public int numberPresentation; + + /** + * The type of call for the current call log entry. Cached here as the call back + * intent is set only when the actions ViewStub is inflated. + */ + public int callType; + + /** + * If the call has an associated voicemail message, the URI of the voicemail message for + * playback. Cached here as the voicemail intent is only set when the actions ViewStub is + * inflated. + */ + public String voicemailUri; + + /** + * The name or number associated with the call. Cached here for use when setting content + * descriptions on buttons in the actions ViewStub when it is inflated. + */ + public CharSequence nameOrNumber; private CallLogListItemViews(QuickContactBadge quickContactView, View primaryActionView, - View secondaryActionView, ImageView secondaryActionButtonView, PhoneCallDetailsViews phoneCallDetailsViews, TextView listHeaderTextView) { this.quickContactView = quickContactView; this.primaryActionView = primaryActionView; - this.secondaryActionView = secondaryActionView; - this.secondaryActionButtonView = secondaryActionButtonView; this.phoneCallDetailsViews = phoneCallDetailsViews; this.listHeaderTextView = listHeaderTextView; } @@ -61,8 +103,6 @@ public final class CallLogListItemViews { return new CallLogListItemViews( (QuickContactBadge) view.findViewById(R.id.quick_contact_photo), view.findViewById(R.id.primary_action_view), - view.findViewById(R.id.secondary_action_view), - (ImageView) view.findViewById(R.id.secondary_action_icon), PhoneCallDetailsViews.fromView(view), (TextView) view.findViewById(R.id.call_log_header)); } @@ -72,8 +112,6 @@ public final class CallLogListItemViews { return new CallLogListItemViews( new QuickContactBadge(context), new View(context), - new View(context), - new ImageView(context), PhoneCallDetailsViews.createForTest(context), new TextView(context)); } |