summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2015-04-21 10:17:41 -0700
committerTyler Gunn <tgunn@google.com>2015-04-21 10:17:41 -0700
commit9afa723dcebf18759c63dc1c976b05050e348d2a (patch)
treea17b5994ca3054fe673328024b3c7bf8f8096313 /src
parent41ddbe19ea116ce45c1cd91d8c0584a16f13ba84 (diff)
CallLogAdapter cleanup and refactoring.
- Some minor cleanup and refactoring. Bug: 20393675 Change-Id: I438a9ca222cac87c9323417a216453706393c190
Diffstat (limited to 'src')
-rw-r--r--src/com/android/dialer/calllog/CallLogAdapter.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java
index cc1a4a632..f2a84c99f 100644
--- a/src/com/android/dialer/calllog/CallLogAdapter.java
+++ b/src/com/android/dialer/calllog/CallLogAdapter.java
@@ -22,22 +22,17 @@ import android.content.res.Resources;
import android.database.Cursor;
import android.net.Uri;
import android.provider.ContactsContract.CommonDataKinds.Phone;
-import android.provider.ContactsContract.PhoneLookup;
import android.support.v7.widget.RecyclerView.ViewHolder;
import android.telecom.PhoneAccountHandle;
import android.telephony.PhoneNumberUtils;
import android.text.TextUtils;
-import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.AccessibilityDelegate;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.view.accessibility.AccessibilityEvent;
-import android.widget.ImageView;
-import android.widget.TextView;
-import com.android.contacts.common.util.UriUtils;
import com.android.dialer.PhoneCallDetails;
import com.android.dialer.PhoneCallDetailsHelper;
import com.android.dialer.R;
@@ -54,7 +49,6 @@ import java.util.HashMap;
*/
public class CallLogAdapter extends GroupingListAdapter
implements ViewTreeObserver.OnPreDrawListener, CallLogGroupBuilder.GroupCreator {
- private static final String TAG = CallLogAdapter.class.getSimpleName();
/** Interface used to inform a parent UI element that a list item has been expanded. */
public interface CallItemExpandedListener {
@@ -126,8 +120,6 @@ public class CallLogAdapter extends GroupingListAdapter
/** Helper to group call log entries. */
private final CallLogGroupBuilder mCallLogGroupBuilder;
- private CallItemExpandedListener mCallItemExpandedListener;
-
/** Listener for the primary or secondary actions in the list.
* Primary opens the call details.
* Secondary calls or plays.
@@ -262,6 +254,16 @@ public class CallLogAdapter extends GroupingListAdapter
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
+ return createCallLogEntryViewHolder(parent);
+ }
+
+ /**
+ * Creates a new call log entry {@link ViewHolder}.
+ *
+ * @param parent the parent view.
+ * @return The {@link ViewHolder}.
+ */
+ private ViewHolder createCallLogEntryViewHolder(ViewGroup parent) {
LayoutInflater inflater = LayoutInflater.from(mContext);
View view = inflater.inflate(R.layout.call_log_list_item, parent, false);