summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2013-08-15 18:57:58 -0700
committerYorke Lee <yorkelee@google.com>2013-08-15 18:59:02 -0700
commit34d5488f5db8cb005ff092cd1079513278be2722 (patch)
tree430ef8f7046a277cef8c96b13fb61a46df6c3e15
parentba6b3366f21c47454b3ba5189e94bb6bf58fd11d (diff)
Make info icon launch quick contact
Bug: 10350012 Change-Id: I3eaed3d43bc598175d29b305180e847d0200b4f4
-rw-r--r--src/com/android/dialer/list/PhoneFavoriteSquareTileView.java12
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);
+ }
}