diff options
Diffstat (limited to 'src/com/android/dialer/calllog/CallLogAdapter.java')
| -rw-r--r-- | src/com/android/dialer/calllog/CallLogAdapter.java | 42 |
1 files changed, 4 insertions, 38 deletions
diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java index f5a3f62ed..78da6e8f0 100644 --- a/src/com/android/dialer/calllog/CallLogAdapter.java +++ b/src/com/android/dialer/calllog/CallLogAdapter.java @@ -96,12 +96,6 @@ public class CallLogAdapter extends GroupingListAdapter protected ContactInfoCache mContactInfoCache; /** - * Tracks the call log row which was previously expanded. Used so that the closure of a - * previously expanded call log entry can be animated on rebind. - */ - private long mPreviouslyExpanded = NONE_EXPANDED; - - /** * Tracks the currently expanded call log row. */ private long mCurrentlyExpanded = NONE_EXPANDED; @@ -193,15 +187,16 @@ public class CallLogAdapter extends GroupingListAdapter return true; } - public CallLogAdapter(Context context, CallFetcher callFetcher, - ContactInfoHelper contactInfoHelper, CallItemExpandedListener callItemExpandedListener, + public CallLogAdapter( + Context context, + CallFetcher callFetcher, + ContactInfoHelper contactInfoHelper, OnReportButtonClickListener onReportButtonClickListener) { super(context); mContext = context; mCallFetcher = callFetcher; mContactInfoHelper = contactInfoHelper; - mCallItemExpandedListener = callItemExpandedListener; mOnReportButtonClickListener = onReportButtonClickListener; @@ -500,14 +495,10 @@ public class CallLogAdapter extends GroupingListAdapter private boolean toggleExpansion(long rowId) { if (rowId == mCurrentlyExpanded) { // Collapsing currently expanded row. - mPreviouslyExpanded = NONE_EXPANDED; mCurrentlyExpanded = NONE_EXPANDED; - return false; } else { // Expanding a row (collapsing current expanded one). - - mPreviouslyExpanded = mCurrentlyExpanded; mCurrentlyExpanded = rowId; return true; } @@ -671,30 +662,5 @@ public class CallLogAdapter extends GroupingListAdapter mActionListener, mPhoneNumberUtilsWrapper, mCallLogViewsHelper); - - // Animate the expansion or collapse. - if (mCallItemExpandedListener != null) { - if (animate) { - mCallItemExpandedListener.onItemExpanded(view); - } - - // Animate the collapse of the previous item if it is still visible on screen. - if (mPreviouslyExpanded != NONE_EXPANDED) { - View previousItem = mCallItemExpandedListener.getViewForCallId(mPreviouslyExpanded); - - if (previousItem != null) { - ((CallLogListItemViews) previousItem.getTag()).expandOrCollapseActions( - false /* isExpanded */, - mOnReportButtonClickListener, - mActionListener, - mPhoneNumberUtilsWrapper, - mCallLogViewsHelper); - if (animate) { - mCallItemExpandedListener.onItemExpanded(previousItem); - } - } - mPreviouslyExpanded = NONE_EXPANDED; - } - } } } |
