Merge "Simplify PhoneNumberPickerActionListener logic in DialtactsActivity"
diff --git a/res/drawable-hdpi/star_thumbnail.png b/res/drawable-hdpi/star_thumbnail.png
deleted file mode 100644
index 1d4d5e1..0000000
--- a/res/drawable-hdpi/star_thumbnail.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/star_thumbnail.png b/res/drawable-mdpi/star_thumbnail.png
deleted file mode 100644
index 7b96272..0000000
--- a/res/drawable-mdpi/star_thumbnail.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/star_thumbnail.png b/res/drawable-xhdpi/star_thumbnail.png
deleted file mode 100644
index a71262f..0000000
--- a/res/drawable-xhdpi/star_thumbnail.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/star_thumbnail.png b/res/drawable-xxhdpi/star_thumbnail.png
deleted file mode 100644
index 5f13fec..0000000
--- a/res/drawable-xxhdpi/star_thumbnail.png
+++ /dev/null
Binary files differ
diff --git a/res/layout/call_log_list_item.xml b/res/layout/call_log_list_item.xml
index 63436b5..6068bd8 100644
--- a/res/layout/call_log_list_item.xml
+++ b/res/layout/call_log_list_item.xml
@@ -49,7 +49,6 @@
             android:background="@drawable/call_log_background"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_centerVertical="true"
             android:padding="@dimen/call_log_outer_margin"
             android:orientation="horizontal"
             android:gravity="center_vertical"
@@ -91,6 +90,7 @@
                     android:textSize="@dimen/call_log_secondary_text_size"
                     android:singleLine="true"
                     android:ellipsize="marquee"
+                    android:visibility="gone"
                     />
                 <LinearLayout
                     android:id="@+id/call_type"
diff --git a/res/layout/dialtacts_activity.xml b/res/layout/dialtacts_activity.xml
index 595eae1..e0049b5 100644
--- a/res/layout/dialtacts_activity.xml
+++ b/res/layout/dialtacts_activity.xml
@@ -79,28 +79,22 @@
         </LinearLayout>
     </com.android.dialer.list.RemoveView >
     <FrameLayout
-        android:layout_height="@dimen/floating_action_button_height"
+        android:id="@+id/floating_action_button_container"
         android:layout_width="@dimen/floating_action_button_width"
+        android:layout_height="@dimen/floating_action_button_height"
         android:layout_marginRight="@dimen/floating_action_button_margin_right"
         android:layout_marginBottom="@dimen/floating_action_button_margin_bottom"
-        android:id="@+id/floating_action_button"
         android:layout_centerHorizontal="true"
         android:layout_alignParentBottom="true">
+
         <ImageButton
-            android:id="@+id/dialpad_button"
-            android:background="@drawable/floating_action_button"
+            android:id="@+id/floating_action_button"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
+            android:background="@drawable/floating_action_button"
             android:contentDescription="@string/action_menu_dialpad_button"
             android:src="@drawable/fab_ic_dial"/>
-        <ImageButton
-            android:id="@+id/dial_button"
-            android:background="@drawable/floating_action_button"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:contentDescription="@string/description_dial_button"
-            android:src="@drawable/fab_ic_call"
-            android:visibility="gone" />
+
     </FrameLayout>
     <!-- Host container for the contact tile drag shadow -->
     <FrameLayout
diff --git a/res/layout/phone_favorite_tile_view.xml b/res/layout/phone_favorite_tile_view.xml
index 90aa515..01d855b 100644
--- a/res/layout/phone_favorite_tile_view.xml
+++ b/res/layout/phone_favorite_tile_view.xml
@@ -52,7 +52,7 @@
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:orientation="horizontal"
-                    android:gravity="center">
+                    android:gravity="center_vertical">
                     <TextView
                         android:id="@+id/contact_tile_name"
                         android:layout_width="wrap_content"
@@ -70,7 +70,7 @@
                         android:layout_width="@dimen/favorites_star_icon_size"
                         android:layout_height="@dimen/favorites_star_icon_size"
                         android:layout_marginStart="3dp"
-                        android:src="@drawable/star_thumbnail"
+                        android:src="@drawable/ic_star"
                         android:visibility="gone" />
                 </LinearLayout>
                 <TextView
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index baffec3..89bd592 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -71,7 +71,7 @@
     <dimen name="recent_call_log_item_padding">8dp</dimen>
 
     <!-- Size of the star icon on the favorites tile. -->
-    <dimen name="favorites_star_icon_size">10dp</dimen>
+    <dimen name="favorites_star_icon_size">12dp</dimen>
 
     <!-- Padding for the tooltip -->
     <dimen name="dismiss_button_padding_start">20dip</dimen>
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java
index b7272d7..8d14f01 100644
--- a/src/com/android/dialer/DialtactsActivity.java
+++ b/src/com/android/dialer/DialtactsActivity.java
@@ -54,6 +54,7 @@
 import android.view.inputmethod.InputMethodManager;
 import android.widget.AbsListView.OnScrollListener;
 import android.widget.EditText;
+import android.widget.ImageButton;
 import android.widget.PopupMenu;
 import android.widget.RelativeLayout;
 import android.widget.Toast;
@@ -153,9 +154,8 @@
      */
     private ListsFragment mListsFragment;
 
-    private View mFloatingActionButton;
-    private View mDialpadButton;
-    private View mDialButton;
+    private View mFloatingActionButtonContainer;
+    private ImageButton mFloatingActionButton;
 
     private View mFragmentsFrame;
 
@@ -163,6 +163,7 @@
     private boolean mInDialpadSearch;
     private boolean mInRegularSearch;
     private boolean mClearSearchOnPause;
+    private boolean isDialpadShown;
 
     /**
      * The position of the currently selected tab in the attached {@link ListsFragment}.
@@ -343,13 +344,11 @@
 
         mFragmentsFrame = findViewById(R.id.dialtacts_frame);
 
-        mFloatingActionButton = findViewById(R.id.floating_action_button);
-        ViewUtil.setupFloatingActionButton(mFloatingActionButton, getResources());
+        mFloatingActionButtonContainer = findViewById(R.id.floating_action_button_container);
+        ViewUtil.setupFloatingActionButton(mFloatingActionButtonContainer, getResources());
 
-        mDialButton = findViewById(R.id.dial_button);
-        mDialButton.setOnClickListener(this);
-        mDialpadButton = findViewById(R.id.dialpad_button);
-        mDialpadButton.setOnClickListener(this);
+        mFloatingActionButton = (ImageButton) findViewById(R.id.floating_action_button);
+        mFloatingActionButton.setOnClickListener(this);
 
         mRemoveViewContainer = findViewById(R.id.remove_view_container);
 
@@ -426,17 +425,14 @@
     @Override
     public void onClick(View view) {
         switch (view.getId()) {
-            case R.id.dialpad_button:
-                // Reset the boolean flag that tracks whether the dialpad was up because
-                // we were in call. Regardless of whether it was true before, we want to
-                // show the dialpad because the user has explicitly clicked the dialpad
-                // button.
-                mInCallDialpadUp = false;
-                showDialpadFragment(true);
-                break;
-            case R.id.dial_button:
-                // Dial button was pressed; tell the Dialpad fragment
-                mDialpadFragment.dialButtonPressed();
+            case R.id.floating_action_button:
+                if (!isDialpadShown) {
+                    mInCallDialpadUp = false;
+                    showDialpadFragment(true);
+                } else {
+                    // Dial button was pressed; tell the Dialpad fragment
+                    mDialpadFragment.dialButtonPressed();
+                }
                 break;
             case R.id.search_close_button:
                 // Clear the search field
@@ -500,15 +496,15 @@
     @Override
     public boolean onLongClick(View view) {
         switch (view.getId()) {
-            case R.id.dial_button: {
-                // Dial button was pressed; tell the Dialpad fragment
-                mDialpadFragment.dialButtonPressed();
-                return true;  // Consume the event
-            }
-            default: {
+            case R.id.floating_action_button:
+                if (isDialpadShown) {
+                    // Dial button was pressed; tell the Dialpad fragment
+                    mDialpadFragment.dialButtonPressed();
+                    return true;  // Consume the event
+                }
+            default:
                 Log.wtf(TAG, "Unexpected onClick event from " + view);
                 break;
-            }
         }
         return false;
     }
@@ -578,8 +574,10 @@
      * Callback from child DialpadFragment when the dialpad is shown.
      */
     public void onDialpadShown() {
-        mDialButton.setVisibility(View.VISIBLE);
-        mDialpadButton.setVisibility(View.GONE);
+        isDialpadShown = true;
+        mFloatingActionButton.setImageResource(R.drawable.fab_ic_call);
+        mFloatingActionButton.setContentDescription(
+                getResources().getString(R.string.description_dial_button));
 
         SearchFragment fragment = null;
         if (mInDialpadSearch) {
@@ -605,8 +603,10 @@
      * Callback from child DialpadFragment when the dialpad is hidden.
      */
     public void onDialpadHidden() {
-        mDialButton.setVisibility(View.GONE);
-        mDialpadButton.setVisibility(View.VISIBLE);
+        isDialpadShown = false;
+        mFloatingActionButton.setImageResource(R.drawable.fab_ic_dial);
+        mFloatingActionButton.setContentDescription(
+                getResources().getString(R.string.action_menu_dialpad_button));
 
         SearchFragment fragment = null;
         if (mInDialpadSearch) {
@@ -873,15 +873,8 @@
     }
 
     @Override
-    public void setDialButtonEnabled(boolean enabled) {
-        if (mDialButton != null) {
-            mDialButton.setEnabled(enabled);
-        }
-    }
-
-    @Override
-    public void setDialButtonContainerVisible(boolean visible) {
-        mFloatingActionButton.setVisibility(visible ? View.VISIBLE : View.GONE);
+    public void setFloatingActionButtonVisible(boolean visible) {
+        mFloatingActionButtonContainer.setVisibility(visible ? View.VISIBLE : View.GONE);
     }
 
     private boolean phoneIsInUse() {
@@ -1006,17 +999,17 @@
 
     private void alignFloatingActionButtonRight() {
         final RelativeLayout.LayoutParams params =
-                (RelativeLayout.LayoutParams) mFloatingActionButton.getLayoutParams();
+                (RelativeLayout.LayoutParams) mFloatingActionButtonContainer.getLayoutParams();
         params.removeRule(RelativeLayout.CENTER_HORIZONTAL);
         params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
-        mFloatingActionButton.setLayoutParams(params);
+        mFloatingActionButtonContainer.setLayoutParams(params);
     }
 
     private void alignFloatingActionButtonMiddle() {
         final RelativeLayout.LayoutParams params =
-                (RelativeLayout.LayoutParams) mFloatingActionButton.getLayoutParams();
+                (RelativeLayout.LayoutParams) mFloatingActionButtonContainer.getLayoutParams();
         params.removeRule(RelativeLayout.ALIGN_PARENT_RIGHT);
         params.addRule(RelativeLayout.CENTER_HORIZONTAL);
-        mFloatingActionButton.setLayoutParams(params);
+        mFloatingActionButtonContainer.setLayoutParams(params);
     }
 }
diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java
index 77e6d00..0aca913 100644
--- a/src/com/android/dialer/calllog/CallLogAdapter.java
+++ b/src/com/android/dialer/calllog/CallLogAdapter.java
@@ -66,6 +66,15 @@
         REMOVE_CALL_LOG_ENTRIES,
     }
 
+    /** Interface used to inform a parent UI element that a list item has been expanded. */
+    public interface CallItemExpandedListener {
+        /**
+         * @param view The {@link CallLogListItemView} that represents the item that was clicked
+         *         on.
+         */
+        public void onItemExpanded(CallLogListItemView view);
+    }
+
     /** Interface used to initiate a refresh of the content. */
     public interface CallFetcher {
         public void fetchCalls();
@@ -199,6 +208,8 @@
     /** Helper to group call log entries. */
     private final CallLogGroupBuilder mCallLogGroupBuilder;
 
+    private CallItemExpandedListener mCallItemExpandedListener;
+
     /** Can be set to true by tests to disable processing of requests. */
     private volatile boolean mRequestProcessingDisabled = false;
 
@@ -245,7 +256,7 @@
     private final View.OnClickListener mExpandCollapseListener = new View.OnClickListener() {
         @Override
         public void onClick(View v) {
-            final View callLogItem = (View) v.getParent().getParent();
+            final CallLogListItemView callLogItem = (CallLogListItemView) v.getParent().getParent();
             final CallLogListItemViews views = (CallLogListItemViews) callLogItem.getTag();
 
             // Hide or show the actions view.
@@ -253,6 +264,11 @@
 
             // Trigger loading of the viewstub and visual expand or collapse.
             expandOrCollapseActions(callLogItem, expanded);
+
+            if (mCallItemExpandedListener != null) {
+                mCallItemExpandedListener.onItemExpanded(callLogItem);
+            }
+
             notifyDataSetChanged();
         }
     };
@@ -297,7 +313,7 @@
     };
 
     public CallLogAdapter(Context context, CallFetcher callFetcher,
-            ContactInfoHelper contactInfoHelper,
+            ContactInfoHelper contactInfoHelper, CallItemExpandedListener callItemExpandedListener,
             boolean isCallLog) {
         super(context);
 
@@ -305,6 +321,7 @@
         mCallFetcher = callFetcher;
         mContactInfoHelper = contactInfoHelper;
         mIsCallLog = isCallLog;
+        mCallItemExpandedListener = callItemExpandedListener;
 
         mContactInfoCache = ExpirableCache.create(CONTACT_INFO_CACHE_SIZE);
         mRequests = new LinkedList<ContactInfoRequest>();
diff --git a/src/com/android/dialer/calllog/CallLogFragment.java b/src/com/android/dialer/calllog/CallLogFragment.java
index 0f3e405..2b2d43c 100644
--- a/src/com/android/dialer/calllog/CallLogFragment.java
+++ b/src/com/android/dialer/calllog/CallLogFragment.java
@@ -16,6 +16,9 @@
 
 package com.android.dialer.calllog;
 
+import android.animation.Animator;
+import android.animation.ValueAnimator;
+import android.animation.Animator.AnimatorListener;
 import android.app.Activity;
 import android.app.KeyguardManager;
 import android.app.ListFragment;
@@ -30,9 +33,14 @@
 import android.provider.CallLog.Calls;
 import android.provider.ContactsContract;
 import android.provider.VoicemailContract.Status;
+import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
+import android.view.ViewTreeObserver;
+import android.view.ViewGroup.LayoutParams;
+import android.widget.FrameLayout;
+import android.widget.LinearLayout;
 import android.widget.ListView;
 import android.widget.TextView;
 
@@ -54,7 +62,9 @@
  * (all, missed or voicemails), specify it in the constructor.
  */
 public class CallLogFragment extends ListFragment
-        implements CallLogQueryHandler.Listener, CallLogAdapter.CallFetcher {
+        implements CallLogQueryHandler.Listener,
+        CallLogAdapter.CallFetcher,
+        CallLogAdapter.CallItemExpandedListener {
     private static final String TAG = "CallLogFragment";
 
     /**
@@ -80,6 +90,8 @@
     private boolean mCallLogFetched;
     private boolean mVoicemailStatusFetched;
 
+    private float mExpandedItemElevation;
+
     private final Handler mHandler = new Handler();
 
     private class CustomContentObserver extends ContentObserver {
@@ -154,7 +166,7 @@
 
         String currentCountryIso = GeoUtil.getCurrentCountryIso(getActivity());
         mAdapter = ObjectFactory.newCallLogAdapter(getActivity(), this, new ContactInfoHelper(
-                getActivity(), currentCountryIso), true);
+                getActivity(), currentCountryIso), this, true);
         setListAdapter(mAdapter);
         mCallLogQueryHandler = new CallLogQueryHandler(getActivity().getContentResolver(),
                 this, mLogLimit);
@@ -168,6 +180,8 @@
                 Status.CONTENT_URI, true, mVoicemailStatusObserver);
         setHasOptionsMenu(true);
         updateCallList(mCallTypeFilter, mDateLimit);
+
+        mExpandedItemElevation = getResources().getDimension(R.dimen.call_log_expanded_elevation);
     }
 
     /** Called by the CallLogQueryHandler when the list of calls has been fetched or updated. */
@@ -503,4 +517,71 @@
         listView.removeFooterView(mFooterView);
         listView.addFooterView(mFooterView);
     }
+
+    @Override
+    public void onItemExpanded(final CallLogListItemView view) {
+        final int startingHeight = view.getHeight();
+        final CallLogListItemViews viewHolder = (CallLogListItemViews) view.getTag();
+        final ViewTreeObserver observer = getListView().getViewTreeObserver();
+        observer.addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
+            @Override
+            public boolean onPreDraw() {
+                // We don't want to continue getting called for every draw.
+                if (observer.isAlive()) {
+                    observer.removeOnPreDrawListener(this);
+                }
+                // Calculate some values to help with the animation.
+                final int endingHeight = view.getHeight();
+                final int distance = Math.abs(endingHeight - startingHeight);
+                final int baseHeight = Math.min(endingHeight, startingHeight);
+                final boolean isExpand = endingHeight > startingHeight;
+
+                // Set the views back to the start state of the animation
+                view.getLayoutParams().height = startingHeight;
+                if (!isExpand) {
+                    viewHolder.actionsView.setVisibility(View.VISIBLE);
+                }
+                view.requestLayout();
+
+                // Set up the animator to animate the expansion.
+                ValueAnimator animator = isExpand ? ValueAnimator.ofFloat(0f, 1f)
+                        : ValueAnimator.ofFloat(1f, 0f);
+
+                animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
+                    @Override
+                    public void onAnimationUpdate(ValueAnimator animator) {
+                        Float value = (Float) animator.getAnimatedValue();
+
+                        // For each value from 0 to 1, animate the various parts of the layout.
+                        view.getLayoutParams().height =
+                                (int) (value * distance + baseHeight);
+                        view.setElevation(mExpandedItemElevation * value);
+                        view.requestLayout();
+                    }
+                });
+                // Set everything to their final values when the animation's done.
+                animator.addListener(new AnimatorListener() {
+                    @Override
+                    public void onAnimationEnd(Animator animation) {
+                        view.getLayoutParams().height = LayoutParams.WRAP_CONTENT;
+                        if (!isExpand) {
+                            viewHolder.actionsView.setVisibility(View.GONE);
+                        }
+                    }
+
+                    @Override
+                    public void onAnimationCancel(Animator animation) {}
+                    @Override
+                    public void onAnimationRepeat(Animator animation) { }
+                    @Override
+                    public void onAnimationStart(Animator animation) { }
+                });
+                animator.start();
+
+                // Return false so this draw does not occur to prevent the final frame from
+                // being drawn for the single frame before the animations start.
+                return false;
+            }
+        });
+    }
 }
diff --git a/src/com/android/dialer/calllog/CallLogListItemView.java b/src/com/android/dialer/calllog/CallLogListItemView.java
index 113b02a..b8990f5 100644
--- a/src/com/android/dialer/calllog/CallLogListItemView.java
+++ b/src/com/android/dialer/calllog/CallLogListItemView.java
@@ -35,12 +35,4 @@
     public CallLogListItemView(Context context, AttributeSet attrs, int defStyle) {
         super(context, attrs, defStyle);
     }
-
-    @Override
-    public void requestLayout() {
-        // We will assume that once measured this will not need to resize
-        // itself, so there is no need to pass the layout request to the parent
-        // view (ListView).
-        forceLayout();
-    }
 }
diff --git a/src/com/android/dialer/dialpad/DialpadFragment.java b/src/com/android/dialer/dialpad/DialpadFragment.java
index 0ded9ab..4557bd4 100644
--- a/src/com/android/dialer/dialpad/DialpadFragment.java
+++ b/src/com/android/dialer/dialpad/DialpadFragment.java
@@ -109,8 +109,7 @@
      * TODO: Refactor the app so this interchange is a bit cleaner.
      */
     public interface HostInterface {
-        void setDialButtonEnabled(boolean enabled);
-        void setDialButtonContainerVisible(boolean visible);
+        void setFloatingActionButtonVisible(boolean visible);
     }
 
     /**
@@ -318,7 +317,7 @@
         if (mDialpadQueryListener != null) {
             mDialpadQueryListener.onDialpadQueryChanged(mDigits.getText().toString());
         }
-        updateDialAndDeleteButtonEnabledState();
+        updateDeleteButtonEnabledState();
     }
 
     @Override
@@ -673,7 +672,7 @@
 
         stopWatch.lap("hnt");
 
-        updateDialAndDeleteButtonEnabledState();
+        updateDeleteButtonEnabledState();
 
         stopWatch.lap("bes");
 
@@ -1218,7 +1217,7 @@
             if (mDialpadView != null) {
                 mDialpadView.setVisibility(View.GONE);
             }
-            ((HostInterface) getActivity()).setDialButtonContainerVisible(false);
+            ((HostInterface) getActivity()).setFloatingActionButtonVisible(false);
 
             mDialpadChooser.setVisibility(View.VISIBLE);
 
@@ -1235,7 +1234,7 @@
             } else {
                 mDigits.setVisibility(View.VISIBLE);
             }
-            ((HostInterface) getActivity()).setDialButtonContainerVisible(true);
+            ((HostInterface) getActivity()).setFloatingActionButtonVisible(true);
             mDialpadChooser.setVisibility(View.GONE);
         }
     }
@@ -1486,23 +1485,12 @@
     /**
      * Update the enabledness of the "Dial" and "Backspace" buttons if applicable.
      */
-    private void updateDialAndDeleteButtonEnabledState() {
+    private void updateDeleteButtonEnabledState() {
         if (getActivity() == null) {
             return;
         }
         final boolean digitsNotEmpty = !isDigitsEmpty();
         mDelete.setEnabled(digitsNotEmpty);
-        // On CDMA phones, if we're already on a call, we *always* enable the Dial button (since
-        // you can press it without entering any digits to send an empty flash.)
-        if (phoneIsCdma() && phoneIsOffhook()) {
-            ((HostInterface) getActivity()).setDialButtonEnabled(true);
-        } else {
-            // Common case: GSM, or CDMA but not on a call. Enable the Dial button if something
-            // has been entered into the digits field, or if there is a last dialed number that
-            // could be redialed.
-            ((HostInterface) getActivity()).setDialButtonEnabled(
-                    digitsNotEmpty || !TextUtils.isEmpty(mLastNumberDialed));
-        }
     }
 
     /**
@@ -1587,7 +1575,7 @@
                             // doing anything here.
                             if (getActivity() == null) return;
                             mLastNumberDialed = number;
-                            updateDialAndDeleteButtonEnabledState();
+                            updateDeleteButtonEnabledState();
                         }
                     });
         mCallLog.getLastOutgoingCall(lastCallArgs);
diff --git a/src/com/android/dialer/list/ListsFragment.java b/src/com/android/dialer/list/ListsFragment.java
index 4a26d42..18fa531 100644
--- a/src/com/android/dialer/list/ListsFragment.java
+++ b/src/com/android/dialer/list/ListsFragment.java
@@ -214,7 +214,7 @@
                 this, 1);
         final String currentCountryIso = GeoUtil.getCurrentCountryIso(getActivity());
         mCallLogAdapter = ObjectFactory.newCallLogAdapter(getActivity(), this,
-                new ContactInfoHelper(getActivity(), currentCountryIso), false);
+                new ContactInfoHelper(getActivity(), currentCountryIso), null, false);
 
         mMergedAdapter = new ShortcutCardsAdapter(getActivity(), this, mCallLogAdapter);
     }
diff --git a/src/com/android/dialerbind/ObjectFactory.java b/src/com/android/dialerbind/ObjectFactory.java
index e7ca8d9..9786311 100644
--- a/src/com/android/dialerbind/ObjectFactory.java
+++ b/src/com/android/dialerbind/ObjectFactory.java
@@ -21,6 +21,7 @@
 import android.content.Context;
 
 import com.android.dialer.calllog.CallLogAdapter;
+import com.android.dialer.calllog.CallLogAdapter.CallItemExpandedListener;
 import com.android.dialer.calllog.ContactInfoHelper;
 import com.android.dialer.service.CachedNumberLookupService;
 
@@ -43,7 +44,9 @@
      * @return Instance of CallLogAdapter.
      */
     public static CallLogAdapter newCallLogAdapter(Context context, CallFetcher callFetcher,
-            ContactInfoHelper contactInfoHelper, boolean isCallLog) {
-        return new CallLogAdapter(context, callFetcher, contactInfoHelper, isCallLog);
+            ContactInfoHelper contactInfoHelper, CallItemExpandedListener callItemExpandedListener,
+            boolean isCallLog) {
+        return new CallLogAdapter(context, callFetcher, contactInfoHelper, callItemExpandedListener,
+                isCallLog);
     }
 }
diff --git a/tests/src/com/android/dialer/calllog/CallLogAdapterTest.java b/tests/src/com/android/dialer/calllog/CallLogAdapterTest.java
index 55e4224..8225d13 100644
--- a/tests/src/com/android/dialer/calllog/CallLogAdapterTest.java
+++ b/tests/src/com/android/dialer/calllog/CallLogAdapterTest.java
@@ -212,7 +212,7 @@
 
         public TestCallLogAdapter(Context context, CallFetcher callFetcher,
                 ContactInfoHelper contactInfoHelper) {
-            super(context, callFetcher, contactInfoHelper, false);
+            super(context, callFetcher, contactInfoHelper, null, false);
         }
 
         @Override