diff options
author | Eric Erfanian <erfanian@google.com> | 2017-06-08 00:54:45 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-06-08 00:54:45 +0000 |
commit | 274b6d320edb3c33e7b3a95c43a811829486a777 (patch) | |
tree | b9bbc285430ffb5363a70eb27e382c38f5a85b7a /java/com/android/contacts/common/list/ContactTileView.java | |
parent | 75233ff03785f24789b32039ac2c208805b7e506 (diff) | |
parent | 91ce7d2a476bd04fe525049a37a2f8b2824e9724 (diff) |
Update AOSP Dialer source from internal google3 repository at cl/158012278.
am: 91ce7d2a47
Change-Id: I1744a8bfca09eae5e9c0d7aac122515eca75bb8b
Diffstat (limited to 'java/com/android/contacts/common/list/ContactTileView.java')
-rw-r--r-- | java/com/android/contacts/common/list/ContactTileView.java | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/java/com/android/contacts/common/list/ContactTileView.java b/java/com/android/contacts/common/list/ContactTileView.java index 9273b0583..15582d684 100644 --- a/java/com/android/contacts/common/list/ContactTileView.java +++ b/java/com/android/contacts/common/list/ContactTileView.java @@ -19,7 +19,6 @@ import android.content.Context; import android.graphics.Rect; import android.net.Uri; import android.util.AttributeSet; -import android.util.Log; import android.view.View; import android.widget.FrameLayout; import android.widget.ImageView; @@ -28,6 +27,9 @@ import com.android.contacts.common.ContactPhotoManager; import com.android.contacts.common.ContactPhotoManager.DefaultImageRequest; import com.android.contacts.common.MoreContactUtils; import com.android.contacts.common.R; +import com.android.dialer.callintent.CallInitiationType; +import com.android.dialer.callintent.CallSpecificAppData; +import com.android.dialer.common.LogUtil; /** A ContactTile displays a contact's picture and name */ public abstract class ContactTileView extends FrameLayout { @@ -60,8 +62,14 @@ public abstract class ContactTileView extends FrameLayout { if (mListener == null) { return; } + CallSpecificAppData callSpecificAppData = + CallSpecificAppData.newBuilder() + .setCallInitiationType(CallInitiationType.Type.SPEED_DIAL) + .build(); mListener.onContactSelected( - getLookupUri(), MoreContactUtils.getTargetRectFromView(ContactTileView.this)); + getLookupUri(), + MoreContactUtils.getTargetRectFromView(ContactTileView.this), + callSpecificAppData); } }; } @@ -97,7 +105,7 @@ public abstract class ContactTileView extends FrameLayout { } } else { - Log.w(TAG, "contactPhotoManager not set"); + LogUtil.w(TAG, "contactPhotoManager not set"); } } else { setVisibility(View.INVISIBLE); @@ -163,9 +171,10 @@ public abstract class ContactTileView extends FrameLayout { public interface Listener { /** Notification that the contact was selected; no specific action is dictated. */ - void onContactSelected(Uri contactLookupUri, Rect viewRect); + void onContactSelected( + Uri contactLookupUri, Rect viewRect, CallSpecificAppData callSpecificAppData); /** Notification that the specified number is to be called. */ - void onCallNumberDirectly(String phoneNumber); + void onCallNumberDirectly(String phoneNumber, CallSpecificAppData callSpecificAppData); } } |