From e3ec9977bbfbdd6659cf27c7341f4c1c826f2209 Mon Sep 17 00:00:00 2001 From: Evan Millar Date: Wed, 30 Sep 2009 19:37:36 -0700 Subject: FastTrack->QuickContact Change-Id: I98f2db38e6402bdbe47b941d82c8f33863d1863e --- core/java/android/provider/ContactsContract.java | 16 ++++++++-------- core/java/android/widget/QuickContactBadge.java | 15 ++++++++++++--- 2 files changed, 20 insertions(+), 11 deletions(-) (limited to 'core/java') diff --git a/core/java/android/provider/ContactsContract.java b/core/java/android/provider/ContactsContract.java index c4f6d5b..1668136 100644 --- a/core/java/android/provider/ContactsContract.java +++ b/core/java/android/provider/ContactsContract.java @@ -2133,12 +2133,12 @@ public final class ContactsContract { } /** - * Helper methods to display FastTrack dialogs that allow users to pivot on + * Helper methods to display QuickContact dialogs that allow users to pivot on * a specific {@link Contacts} entry. * * @hide */ - public static final class FastTrack { + public static final class QuickContact { /** * Action used to trigger person pivot dialog. * @hide @@ -2166,19 +2166,19 @@ public final class ContactsContract { public static final String EXTRA_EXCLUDE_MIMES = "exclude_mimes"; /** - * Small FastTrack mode, usually presented with minimal actions. + * Small QuickContact mode, usually presented with minimal actions. */ public static final int MODE_SMALL = 1; /** - * Medium FastTrack mode, includes actions and light summary describing + * Medium QuickContact mode, includes actions and light summary describing * the {@link Contacts} entry being shown. This may include social * status and presence details. */ public static final int MODE_MEDIUM = 2; /** - * Large FastTrack mode, includes actions and larger, card-like summary + * Large QuickContact mode, includes actions and larger, card-like summary * of the {@link Contacts} entry being shown. This may include detailed * information, such as a photo. */ @@ -2207,7 +2207,7 @@ public final class ContactsContract { * already viewing the contact details card, this can be used * to omit the details entry from the dialog. */ - public static void showFastTrack(Context context, View target, Uri lookupUri, int mode, + public static void showQuickContact(Context context, View target, Uri lookupUri, int mode, String[] excludeMimes) { // Find location and bounds of target view final int[] location = new int[2]; @@ -2220,7 +2220,7 @@ public final class ContactsContract { rect.bottom = rect.top + target.getHeight(); // Trigger with obtained rectangle - showFastTrack(context, rect, lookupUri, mode, excludeMimes); + showQuickContact(context, rect, lookupUri, mode, excludeMimes); } /** @@ -2246,7 +2246,7 @@ public final class ContactsContract { * already viewing the contact details card, this can be used * to omit the details entry from the dialog. */ - public static void showFastTrack(Context context, Rect target, Uri lookupUri, int mode, + public static void showQuickContact(Context context, Rect target, Uri lookupUri, int mode, String[] excludeMimes) { // Launch pivot dialog through intent for now final Intent intent = new Intent(ACTION_FAST_TRACK); diff --git a/core/java/android/widget/QuickContactBadge.java b/core/java/android/widget/QuickContactBadge.java index b550d69..8019f14 100644 --- a/core/java/android/widget/QuickContactBadge.java +++ b/core/java/android/widget/QuickContactBadge.java @@ -25,7 +25,7 @@ import android.database.Cursor; import android.graphics.drawable.Drawable; import android.net.Uri; import android.provider.ContactsContract.Contacts; -import android.provider.ContactsContract.FastTrack; +import android.provider.ContactsContract.QuickContact; import android.provider.ContactsContract.Intents; import android.provider.ContactsContract.PhoneLookup; import android.provider.ContactsContract.RawContacts; @@ -88,7 +88,7 @@ public class QuickContactBadge extends ImageView implements OnClickListener { com.android.internal.R.styleable.QuickContactBadge, defStyle, 0); mMode = a.getInt(com.android.internal.R.styleable.QuickContactBadge_quickContactWindowSize, - FastTrack.MODE_MEDIUM); + QuickContact.MODE_MEDIUM); a.recycle(); @@ -103,6 +103,15 @@ public class QuickContactBadge extends ImageView implements OnClickListener { } /** + * Set the QuickContact window mode. Options are {@link QuickContact#MODE_SMALL}, + * {@link QuickContact#MODE_MEDIUM}, {@link QuickContact#MODE_LARGE}. + * @param size + */ + public void setMode(int size) { + mMode = size; + } + + /** * Assign the contact uri that this QuickContactBadge should be associated * with. Note that this is only used for displaying the QuickContact window and * won't bind the contact's photo for you. @@ -199,7 +208,7 @@ public class QuickContactBadge extends ImageView implements OnClickListener { } private void trigger(Uri lookupUri) { - FastTrack.showFastTrack(getContext(), this, lookupUri, mMode, mExcludeMimes); + QuickContact.showQuickContact(getContext(), this, lookupUri, mMode, mExcludeMimes); } private class QueryHandler extends AsyncQueryHandler { -- cgit v1.1