am 84235ee9: Add extra to exclude specific MIME-types from Fast-Track.

Merge commit '84235ee923c13e58ce339c25c86f734b338a81e0' into eclair-plus-aosp

* commit '84235ee923c13e58ce339c25c86f734b338a81e0':
  Add extra to exclude specific MIME-types from Fast-Track.
This commit is contained in:
Jeff Sharkey
2009-08-23 14:20:51 -07:00
committed by Android Git Automerger
2 changed files with 22 additions and 0 deletions

View File

@@ -1772,6 +1772,13 @@ public final class ContactsContract {
*/
public static final int MODE_LARGE = 3;
/**
* Optional extra used with {@link #SHOW_OR_CREATE_CONTACT} to indicate
* a list of specific MIME-types to exclude and not display. Stored as a
* {@link String} array.
*/
public static final String EXTRA_EXCLUDE_MIMES = "exclude_mimes";
/**
* Intents related to the Contacts app UI.
*/

View File

@@ -80,6 +80,8 @@ public class ContactHeaderWidget extends FrameLayout implements View.OnClickList
protected Uri mContactUri;
protected Uri mStatusUri;
protected String[] mExcludeMimes = null;
protected ContentResolver mContentResolver;
/**
@@ -291,6 +293,15 @@ public class ContactHeaderWidget extends FrameLayout implements View.OnClickList
mStatusView.setText(snippet);
}
/**
* Set a list of specific MIME-types to exclude and not display. For
* example, this can be used to hide the {@link Contacts#CONTENT_ITEM_TYPE}
* profile icon.
*/
public void setExcludeMimes(String[] excludeMimes) {
mExcludeMimes = excludeMimes;
}
/**
* Convenience method for binding all available data from an existing
* contact.
@@ -428,6 +439,10 @@ public class ContactHeaderWidget extends FrameLayout implements View.OnClickList
final Rect target = getTargetRect(view);
intent.putExtra(Intents.EXTRA_TARGET_RECT, target);
intent.putExtra(Intents.EXTRA_MODE, Intents.MODE_SMALL);
if (mExcludeMimes != null) {
// Exclude specific MIME-types when requested
intent.putExtra(Intents.EXTRA_EXCLUDE_MIMES, mExcludeMimes);
}
mContext.startActivity(intent);
break;
}