From 34d5488f5db8cb005ff092cd1079513278be2722 Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Thu, 15 Aug 2013 18:57:58 -0700 Subject: Make info icon launch quick contact Bug: 10350012 Change-Id: I3eaed3d43bc598175d29b305180e847d0200b4f4 --- src/com/android/dialer/list/PhoneFavoriteSquareTileView.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/com/android/dialer/list/PhoneFavoriteSquareTileView.java b/src/com/android/dialer/list/PhoneFavoriteSquareTileView.java index fe07d188e..6c1542dff 100644 --- a/src/com/android/dialer/list/PhoneFavoriteSquareTileView.java +++ b/src/com/android/dialer/list/PhoneFavoriteSquareTileView.java @@ -18,6 +18,7 @@ package com.android.dialer.list; import android.content.Context; import android.content.Intent; +import android.provider.ContactsContract.QuickContact; import android.util.AttributeSet; import android.view.GestureDetector; import android.view.View; @@ -51,11 +52,7 @@ public class PhoneFavoriteSquareTileView extends PhoneFavoriteTileView { mSecondaryButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { - Intent intent = new Intent(Intent.ACTION_VIEW, getLookupUri()); - // Secondary target will be visible only from phone's favorite screen, then - // we want to launch it as a separate People task. - intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); - getContext().startActivity(intent); + launchQuickContact(); } }); @@ -79,4 +76,9 @@ public class PhoneFavoriteSquareTileView extends PhoneFavoriteTileView { // The picture is the full size of the tile (minus some padding, but we can be generous) return mListener.getApproximateTileWidth(); } + + private void launchQuickContact() { + QuickContact.showQuickContact(getContext(), PhoneFavoriteSquareTileView.this, + getLookupUri(), QuickContact.MODE_LARGE, null); + } } -- cgit v1.2.3