diff options
author | Yorke Lee <yorkelee@google.com> | 2013-08-16 16:01:32 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-08-16 16:01:32 +0000 |
commit | b827f9367eb6c8e7bfabdc20d940a7b5859643f6 (patch) | |
tree | d8c42fae3deb5089cde752a7403fc7a53be91fbb | |
parent | 240dfb12d879d412f53ffb9e53bef5a2c4929c70 (diff) | |
parent | 34d5488f5db8cb005ff092cd1079513278be2722 (diff) |
Merge "Make info icon launch quick contact" into klp-dev
-rw-r--r-- | src/com/android/dialer/list/PhoneFavoriteSquareTileView.java | 12 |
1 files 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); + } } |