Merge change 23906 into eclair
* changes: Removing references to deprecated API and the deprecated API itself.
This commit is contained in:
@@ -314,15 +314,6 @@ public final class ContactsContract {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* The content:// style URI for this table joined with useful data from
|
|
||||||
* {@link Data}.
|
|
||||||
*
|
|
||||||
* @deprecated Please use plain CONTENT_URI for the same result
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public static final Uri CONTENT_SUMMARY_URI = CONTENT_URI;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The content:// style URI used for "type-to-filter" functionality on the
|
* The content:// style URI used for "type-to-filter" functionality on the
|
||||||
* {@link #CONTENT_URI} URI. The filter string will be used to match
|
* {@link #CONTENT_URI} URI. The filter string will be used to match
|
||||||
@@ -332,9 +323,6 @@ public final class ContactsContract {
|
|||||||
public static final Uri CONTENT_FILTER_URI = Uri.withAppendedPath(
|
public static final Uri CONTENT_FILTER_URI = Uri.withAppendedPath(
|
||||||
CONTENT_URI, "filter");
|
CONTENT_URI, "filter");
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public static final Uri CONTENT_SUMMARY_FILTER_URI = CONTENT_FILTER_URI;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The content:// style URI for this table joined with useful data from
|
* The content:// style URI for this table joined with useful data from
|
||||||
* {@link Data}, filtered to include only starred contacts
|
* {@link Data}, filtered to include only starred contacts
|
||||||
@@ -343,9 +331,6 @@ public final class ContactsContract {
|
|||||||
public static final Uri CONTENT_STREQUENT_URI = Uri.withAppendedPath(
|
public static final Uri CONTENT_STREQUENT_URI = Uri.withAppendedPath(
|
||||||
CONTENT_URI, "strequent");
|
CONTENT_URI, "strequent");
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public static final Uri CONTENT_SUMMARY_STREQUENT_URI = CONTENT_STREQUENT_URI;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The content:// style URI used for "type-to-filter" functionality on the
|
* The content:// style URI used for "type-to-filter" functionality on the
|
||||||
* {@link #CONTENT_STREQUENT_URI} URI. The filter string will be used to match
|
* {@link #CONTENT_STREQUENT_URI} URI. The filter string will be used to match
|
||||||
@@ -355,14 +340,9 @@ public final class ContactsContract {
|
|||||||
public static final Uri CONTENT_STREQUENT_FILTER_URI = Uri.withAppendedPath(
|
public static final Uri CONTENT_STREQUENT_FILTER_URI = Uri.withAppendedPath(
|
||||||
CONTENT_STREQUENT_URI, "filter");
|
CONTENT_STREQUENT_URI, "filter");
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public static final Uri CONTENT_SUMMARY_STREQUENT_FILTER_URI = CONTENT_STREQUENT_FILTER_URI;
|
|
||||||
|
|
||||||
public static final Uri CONTENT_GROUP_URI = Uri.withAppendedPath(
|
public static final Uri CONTENT_GROUP_URI = Uri.withAppendedPath(
|
||||||
CONTENT_URI, "group");
|
CONTENT_URI, "group");
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public static final Uri CONTENT_SUMMARY_GROUP_URI = CONTENT_GROUP_URI;
|
|
||||||
/**
|
/**
|
||||||
* The MIME type of {@link #CONTENT_URI} providing a directory of
|
* The MIME type of {@link #CONTENT_URI} providing a directory of
|
||||||
* people.
|
* people.
|
||||||
@@ -506,17 +486,6 @@ public final class ContactsContract {
|
|||||||
*/
|
*/
|
||||||
public static final Uri CONTENT_URI = Uri.withAppendedPath(AUTHORITY_URI, "raw_contacts");
|
public static final Uri CONTENT_URI = Uri.withAppendedPath(AUTHORITY_URI, "raw_contacts");
|
||||||
|
|
||||||
/**
|
|
||||||
* The content:// style URL for filtering people by email address. The
|
|
||||||
* filter argument should be passed as an additional path segment after
|
|
||||||
* this URI.
|
|
||||||
*
|
|
||||||
* @hide
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public static final Uri CONTENT_FILTER_EMAIL_URI =
|
|
||||||
Uri.withAppendedPath(CONTENT_URI, "filter_email");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The MIME type of {@link #CONTENT_URI} providing a directory of
|
* The MIME type of {@link #CONTENT_URI} providing a directory of
|
||||||
* people.
|
* people.
|
||||||
@@ -758,25 +727,12 @@ public final class ContactsContract {
|
|||||||
*/
|
*/
|
||||||
public static final String _ID = "presence_id";
|
public static final String _ID = "presence_id";
|
||||||
|
|
||||||
/**
|
|
||||||
* Reference to the {@link RawContacts#_ID} this presence references.
|
|
||||||
* <P>Type: INTEGER</P>
|
|
||||||
*
|
|
||||||
* TODO remove this from public API
|
|
||||||
* @hide
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public static final String RAW_CONTACT_ID = "presence_raw_contact_id";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reference to the {@link Data#_ID} entry that owns this presence.
|
* Reference to the {@link Data#_ID} entry that owns this presence.
|
||||||
* <P>Type: INTEGER</P>
|
* <P>Type: INTEGER</P>
|
||||||
*/
|
*/
|
||||||
public static final String DATA_ID = "presence_data_id";
|
public static final String DATA_ID = "presence_data_id";
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public static final String IM_PROTOCOL = "im_protocol";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>Type: NUMBER</p>
|
* <p>Type: NUMBER</p>
|
||||||
*/
|
*/
|
||||||
@@ -1177,26 +1133,6 @@ public final class ContactsContract {
|
|||||||
*/
|
*/
|
||||||
public static final String FORMATTED_ADDRESS = DATA;
|
public static final String FORMATTED_ADDRESS = DATA;
|
||||||
|
|
||||||
/**
|
|
||||||
* The agent who actually receives the mail. Used in work addresses.
|
|
||||||
* Also for 'in care of' or 'c/o'.
|
|
||||||
* <p>
|
|
||||||
* Type: TEXT
|
|
||||||
* @deprecated since this isn't supported by gd:structuredPostalAddress
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public static final String AGENT = "data4";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Used in places where houses or buildings have names (and not
|
|
||||||
* necessarily numbers), eg. "The Pillars".
|
|
||||||
* <p>
|
|
||||||
* Type: TEXT
|
|
||||||
* @deprecated since this isn't supported by gd:structuredPostalAddress
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public static final String HOUSENAME = "data5";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Can be street, avenue, road, etc. This element also includes the
|
* Can be street, avenue, road, etc. This element also includes the
|
||||||
* house number and room/apartment/flat/floor number.
|
* house number and room/apartment/flat/floor number.
|
||||||
@@ -1231,17 +1167,6 @@ public final class ContactsContract {
|
|||||||
*/
|
*/
|
||||||
public static final String CITY = "data9";
|
public static final String CITY = "data9";
|
||||||
|
|
||||||
/**
|
|
||||||
* Handles administrative districts such as U.S. or U.K. counties
|
|
||||||
* that are not used for mail addressing purposes. Subregion is not
|
|
||||||
* intended for delivery addresses.
|
|
||||||
* <p>
|
|
||||||
* Type: TEXT
|
|
||||||
* @deprecated since this isn't supported by gd:structuredPostalAddress
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public static final String SUBREGION = "data10";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A state, province, county (in Ireland), Land (in Germany),
|
* A state, province, county (in Ireland), Land (in Germany),
|
||||||
* departement (in France), etc.
|
* departement (in France), etc.
|
||||||
|
|||||||
@@ -27,12 +27,8 @@ import android.database.Cursor;
|
|||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.graphics.BitmapFactory;
|
import android.graphics.BitmapFactory;
|
||||||
import android.graphics.Rect;
|
import android.graphics.Rect;
|
||||||
import android.graphics.drawable.Drawable;
|
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Handler;
|
|
||||||
import android.os.Message;
|
|
||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
import android.provider.SocialContract;
|
|
||||||
import android.provider.ContactsContract.Contacts;
|
import android.provider.ContactsContract.Contacts;
|
||||||
import android.provider.ContactsContract.Data;
|
import android.provider.ContactsContract.Data;
|
||||||
import android.provider.ContactsContract.Intents;
|
import android.provider.ContactsContract.Intents;
|
||||||
@@ -43,13 +39,11 @@ import android.provider.ContactsContract.CommonDataKinds.Email;
|
|||||||
import android.provider.ContactsContract.CommonDataKinds.Photo;
|
import android.provider.ContactsContract.CommonDataKinds.Photo;
|
||||||
import android.provider.SocialContract.Activities;
|
import android.provider.SocialContract.Activities;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.util.Log;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.CheckBox;
|
import android.widget.CheckBox;
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.RelativeLayout;
|
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.android.internal.R;
|
import com.android.internal.R;
|
||||||
@@ -77,7 +71,6 @@ public class ContactHeaderWidget extends FrameLayout implements View.OnClickList
|
|||||||
private QueryHandler mQueryHandler;
|
private QueryHandler mQueryHandler;
|
||||||
|
|
||||||
protected long mContactId;
|
protected long mContactId;
|
||||||
protected Uri mContactSummaryUri;
|
|
||||||
protected Uri mContactUri;
|
protected Uri mContactUri;
|
||||||
protected Uri mStatusUri;
|
protected Uri mStatusUri;
|
||||||
|
|
||||||
@@ -313,17 +306,16 @@ public class ContactHeaderWidget extends FrameLayout implements View.OnClickList
|
|||||||
mContactId = contactId;
|
mContactId = contactId;
|
||||||
mContactUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, mContactId);
|
mContactUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, mContactId);
|
||||||
|
|
||||||
bindSummaryUri(ContentUris.withAppendedId(Contacts.CONTENT_SUMMARY_URI, mContactId));
|
bindContactUri(mContactUri);
|
||||||
bindSocialUri(ContentUris.withAppendedId(Activities.CONTENT_CONTACT_STATUS_URI, mContactId));
|
bindSocialUri(ContentUris.withAppendedId(Activities.CONTENT_CONTACT_STATUS_URI, mContactId));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience method for binding {@link Contacts} header details from a
|
* Convenience method for binding {@link Contacts} header details from a
|
||||||
* {@link Contacts#CONTENT_SUMMARY_URI} reference.
|
* {@link Contacts#CONTENT_URI} reference.
|
||||||
*/
|
*/
|
||||||
public void bindSummaryUri(Uri contactSummary) {
|
public void bindContactUri(Uri contactUri) {
|
||||||
mContactSummaryUri = contactSummary;
|
mQueryHandler.startQuery(TOKEN_CONTACT_INFO, null, contactUri, HEADER_PROJECTION,
|
||||||
mQueryHandler.startQuery(TOKEN_CONTACT_INFO, null, mContactSummaryUri, HEADER_PROJECTION,
|
|
||||||
null, null, null);
|
null, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user