Merge change I98f2db38 into eclair
* changes: FastTrack->QuickContact
This commit is contained in:
@@ -186385,6 +186385,19 @@
|
||||
<parameter name="excludeMimes" type="java.lang.String[]">
|
||||
</parameter>
|
||||
</method>
|
||||
<method name="setMode"
|
||||
return="void"
|
||||
abstract="false"
|
||||
native="false"
|
||||
synchronized="false"
|
||||
static="false"
|
||||
final="false"
|
||||
deprecated="not deprecated"
|
||||
visibility="public"
|
||||
>
|
||||
<parameter name="size" type="int">
|
||||
</parameter>
|
||||
</method>
|
||||
<field name="mExcludeMimes"
|
||||
type="java.lang.String[]"
|
||||
transient="false"
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -102,6 +102,15 @@ public class QuickContactBadge extends ImageView implements OnClickListener {
|
||||
setOnClickListener(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user