blob: 9e2aacdc13709fe75a5930b716f259ea93b73616 [file] [log] [blame]
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001/*
2 * Copyright (C) 2006 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.provider;
18
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -080019import com.android.internal.R;
20
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070021import android.content.ContentResolver;
22import android.content.ContentUris;
23import android.content.ContentValues;
24import android.content.Context;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070025import android.database.Cursor;
26import android.graphics.Bitmap;
27import android.graphics.BitmapFactory;
28import android.net.Uri;
29import android.text.TextUtils;
30import android.util.Log;
31import android.widget.ImageView;
32
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070033import java.io.ByteArrayInputStream;
34import java.io.InputStream;
35
36/**
37 * The Contacts provider stores all information about contacts.
Jeff Hamiltonf8526982009-09-24 11:34:58 -050038 *
39 * @deprecated The APIs have been superseded by {@link ContactsContract}. The newer APIs allow
40 * access multiple accounts and support aggregation of similar contacts. These APIs continue to
41 * work but will only return data for the first Google account created, which matches the original
42 * behavior.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070043 */
Jeff Sharkey534aa012009-08-25 14:33:44 -070044@Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070045public class Contacts {
46 private static final String TAG = "Contacts";
Evan Millardc2da5f2009-06-18 16:07:13 -070047
Jeff Hamiltonf8526982009-09-24 11:34:58 -050048 /**
49 * @deprecated see {@link android.provider.ContactsContract}
50 */
Jeff Sharkey534aa012009-08-25 14:33:44 -070051 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070052 public static final String AUTHORITY = "contacts";
53
54 /**
55 * The content:// style URL for this provider
Jeff Hamiltonf8526982009-09-24 11:34:58 -050056 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070057 */
Jeff Sharkey534aa012009-08-25 14:33:44 -070058 @Deprecated
Jeff Hamiltonf8526982009-09-24 11:34:58 -050059 public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY);
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070060
Jeff Hamiltonf8526982009-09-24 11:34:58 -050061 /**
62 * Signifies an email address row that is stored in the ContactMethods table
63 * @deprecated see {@link android.provider.ContactsContract}
64 */
Jeff Sharkey534aa012009-08-25 14:33:44 -070065 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070066 public static final int KIND_EMAIL = 1;
Jeff Hamiltonf8526982009-09-24 11:34:58 -050067 /**
68 * Signifies a postal address row that is stored in the ContactMethods table
69 * @deprecated see {@link android.provider.ContactsContract}
70 */
Jeff Sharkey534aa012009-08-25 14:33:44 -070071 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070072 public static final int KIND_POSTAL = 2;
Jeff Hamiltonf8526982009-09-24 11:34:58 -050073 /**
74 * Signifies an IM address row that is stored in the ContactMethods table
75 * @deprecated see {@link android.provider.ContactsContract}
76 */
Jeff Sharkey534aa012009-08-25 14:33:44 -070077 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070078 public static final int KIND_IM = 3;
Jeff Hamiltonf8526982009-09-24 11:34:58 -050079 /**
80 * Signifies an Organization row that is stored in the Organizations table
81 * @deprecated see {@link android.provider.ContactsContract}
82 */
Jeff Sharkey534aa012009-08-25 14:33:44 -070083 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070084 public static final int KIND_ORGANIZATION = 4;
Jeff Hamiltonf8526982009-09-24 11:34:58 -050085 /**
Ken Wakasaf76a50c2012-03-09 19:56:35 +090086 * Signifies a Phone row that is stored in the Phones table
Jeff Hamiltonf8526982009-09-24 11:34:58 -050087 * @deprecated see {@link android.provider.ContactsContract}
88 */
Jeff Sharkey534aa012009-08-25 14:33:44 -070089 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070090 public static final int KIND_PHONE = 5;
91
92 /**
93 * no public constructor since this is a utility class
94 */
95 private Contacts() {}
96
97 /**
98 * Columns from the Settings table that other columns join into themselves.
Jeff Hamiltonf8526982009-09-24 11:34:58 -050099 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700100 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700101 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700102 public interface SettingsColumns {
103 /**
104 * The _SYNC_ACCOUNT to which this setting corresponds. This may be null.
105 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500106 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700107 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700108 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700109 public static final String _SYNC_ACCOUNT = "_sync_account";
110
111 /**
Fred Quintanad9d2f112009-04-23 13:36:27 -0700112 * The _SYNC_ACCOUNT_TYPE to which this setting corresponds. This may be null.
113 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500114 * @deprecated see {@link android.provider.ContactsContract}
Fred Quintanad9d2f112009-04-23 13:36:27 -0700115 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700116 @Deprecated
Fred Quintanad9d2f112009-04-23 13:36:27 -0700117 public static final String _SYNC_ACCOUNT_TYPE = "_sync_account_type";
118
119 /**
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700120 * The key of this setting.
121 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500122 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700123 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700124 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700125 public static final String KEY = "key";
126
127 /**
128 * The value of this setting.
129 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500130 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700131 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700132 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700133 public static final String VALUE = "value";
134 }
135
136 /**
137 * The settings over all of the people
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500138 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700139 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700140 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700141 public static final class Settings implements BaseColumns, SettingsColumns {
142 /**
143 * no public constructor since this is a utility class
144 */
145 private Settings() {}
146
147 /**
148 * The content:// style URL for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500149 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700150 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700151 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700152 public static final Uri CONTENT_URI =
153 Uri.parse("content://contacts/settings");
154
155 /**
156 * The directory twig for this sub-table
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500157 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700158 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700159 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700160 public static final String CONTENT_DIRECTORY = "settings";
161
162 /**
163 * The default sort order for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500164 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700165 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700166 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700167 public static final String DEFAULT_SORT_ORDER = "key ASC";
168
169 /**
170 * A setting that is used to indicate if we should sync down all groups for the
171 * specified account. For this setting the _SYNC_ACCOUNT column must be set.
172 * If this isn't set then we will only sync the groups whose SHOULD_SYNC column
173 * is set to true.
174 * <p>
175 * This is a boolean setting. It is true if it is set and it is anything other than the
176 * emptry string or "0".
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500177 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700178 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700179 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700180 public static final String SYNC_EVERYTHING = "syncEverything";
181
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500182 /**
183 * @deprecated see {@link android.provider.ContactsContract}
184 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700185 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700186 public static String getSetting(ContentResolver cr, String account, String key) {
187 // For now we only support a single account and the UI doesn't know what
188 // the account name is, so we're using a global setting for SYNC_EVERYTHING.
189 // Some day when we add multiple accounts to the UI this should honor the account
190 // that was asked for.
191 String selectString;
192 String[] selectArgs;
193 if (false) {
194 selectString = (account == null)
195 ? "_sync_account is null AND key=?"
196 : "_sync_account=? AND key=?";
Fred Quintanad9d2f112009-04-23 13:36:27 -0700197// : "_sync_account=? AND _sync_account_type=? AND key=?";
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700198 selectArgs = (account == null)
199 ? new String[]{key}
200 : new String[]{account, key};
201 } else {
202 selectString = "key=?";
203 selectArgs = new String[] {key};
204 }
205 Cursor cursor = cr.query(Settings.CONTENT_URI, new String[]{VALUE},
206 selectString, selectArgs, null);
207 try {
208 if (!cursor.moveToNext()) return null;
209 return cursor.getString(0);
210 } finally {
211 cursor.close();
212 }
213 }
214
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500215 /**
216 * @deprecated see {@link android.provider.ContactsContract}
217 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700218 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700219 public static void setSetting(ContentResolver cr, String account, String key,
220 String value) {
221 ContentValues values = new ContentValues();
222 // For now we only support a single account and the UI doesn't know what
223 // the account name is, so we're using a global setting for SYNC_EVERYTHING.
224 // Some day when we add multiple accounts to the UI this should honor the account
225 // that was asked for.
Fred Quintanad9d2f112009-04-23 13:36:27 -0700226 //values.put(_SYNC_ACCOUNT, account.mName);
227 //values.put(_SYNC_ACCOUNT_TYPE, account.mType);
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700228 values.put(KEY, key);
229 values.put(VALUE, value);
230 cr.update(Settings.CONTENT_URI, values, null, null);
231 }
232 }
233
234 /**
235 * Columns from the People table that other tables join into themselves.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500236 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700237 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700238 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700239 public interface PeopleColumns {
240 /**
The Android Open Source Projectb7986892009-01-09 17:51:23 -0800241 * The person's name.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700242 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500243 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700244 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700245 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700246 public static final String NAME = "name";
247
248 /**
The Android Open Source Projectb7986892009-01-09 17:51:23 -0800249 * Phonetic equivalent of the person's name, in a locale-dependent
250 * character set (e.g. hiragana for Japanese).
251 * Used for pronunciation and/or collation in some languages.
252 * <p>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500253 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectb7986892009-01-09 17:51:23 -0800254 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700255 @Deprecated
The Android Open Source Projectb7986892009-01-09 17:51:23 -0800256 public static final String PHONETIC_NAME = "phonetic_name";
Evan Millardc2da5f2009-06-18 16:07:13 -0700257
The Android Open Source Projectb7986892009-01-09 17:51:23 -0800258 /**
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700259 * The display name. If name is not null name, else if number is not null number,
260 * else if email is not null email.
261 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500262 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700263 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700264 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700265 public static final String DISPLAY_NAME = "display_name";
266
267 /**
The Android Open Source Projectba87e3e2009-03-13 13:04:22 -0700268 * The field for sorting list phonetically. The content of this field
269 * may not be human readable but phonetically sortable.
270 * <P>Type: TEXT</p>
271 * @hide Used only in Contacts application for now.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500272 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectba87e3e2009-03-13 13:04:22 -0700273 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700274 @Deprecated
The Android Open Source Projectba87e3e2009-03-13 13:04:22 -0700275 public static final String SORT_STRING = "sort_string";
Evan Millardc2da5f2009-06-18 16:07:13 -0700276
The Android Open Source Projectba87e3e2009-03-13 13:04:22 -0700277 /**
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700278 * Notes about the person.
279 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500280 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700281 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700282 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700283 public static final String NOTES = "notes";
284
285 /**
286 * The number of times a person has been contacted
287 * <P>Type: INTEGER</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500288 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700289 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700290 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700291 public static final String TIMES_CONTACTED = "times_contacted";
292
293 /**
294 * The last time a person was contacted.
295 * <P>Type: INTEGER</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500296 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700297 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700298 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700299 public static final String LAST_TIME_CONTACTED = "last_time_contacted";
300
301 /**
302 * A custom ringtone associated with a person. Not always present.
303 * <P>Type: TEXT (URI to the ringtone)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500304 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700305 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700306 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700307 public static final String CUSTOM_RINGTONE = "custom_ringtone";
308
309 /**
310 * Whether the person should always be sent to voicemail. Not always
311 * present.
312 * <P>Type: INTEGER (0 for false, 1 for true)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500313 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700314 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700315 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700316 public static final String SEND_TO_VOICEMAIL = "send_to_voicemail";
317
318 /**
319 * Is the contact starred?
320 * <P>Type: INTEGER (boolean)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500321 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700322 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700323 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700324 public static final String STARRED = "starred";
325
326 /**
327 * The server version of the photo
328 * <P>Type: TEXT (the version number portion of the photo URI)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500329 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700330 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700331 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -0700332 public static final String PHOTO_VERSION = "photo_version";
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700333 }
334
335 /**
336 * This table contains people.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500337 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700338 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700339 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700340 public static final class People implements BaseColumns, SyncConstValue, PeopleColumns,
341 PhonesColumns, PresenceColumns {
342 /**
343 * no public constructor since this is a utility class
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500344 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700345 */
346 private People() {}
347
348 /**
349 * The content:// style URL for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500350 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700351 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700352 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700353 public static final Uri CONTENT_URI =
354 Uri.parse("content://contacts/people");
355
356 /**
357 * The content:// style URL for filtering people by name. The filter
358 * argument should be passed as an additional path segment after this URI.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500359 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700360 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700361 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700362 public static final Uri CONTENT_FILTER_URI =
363 Uri.parse("content://contacts/people/filter");
364
365 /**
366 * The content:// style URL for the table that holds the deleted
367 * contacts.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500368 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700369 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700370 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700371 public static final Uri DELETED_CONTENT_URI =
372 Uri.parse("content://contacts/deleted_people");
373
374 /**
Jeffrey Sharkey51045182009-03-25 21:37:10 -0700375 * The content:// style URL for filtering people that have a specific
376 * E-mail or IM address. The filter argument should be passed as an
377 * additional path segment after this URI. This matches any people with
378 * at least one E-mail or IM {@link ContactMethods} that match the
379 * filter.
Evan Millardc2da5f2009-06-18 16:07:13 -0700380 *
Dianne Hackborn935ae462009-04-13 16:11:55 -0700381 * Not exposed because we expect significant changes in the contacts
382 * schema and do not want to have to support this.
383 * @hide
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500384 * @deprecated see {@link android.provider.ContactsContract}
Jeffrey Sharkey51045182009-03-25 21:37:10 -0700385 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700386 @Deprecated
Jeffrey Sharkey51045182009-03-25 21:37:10 -0700387 public static final Uri WITH_EMAIL_OR_IM_FILTER_URI =
388 Uri.parse("content://contacts/people/with_email_or_im_filter");
Evan Millardc2da5f2009-06-18 16:07:13 -0700389
Jeffrey Sharkey51045182009-03-25 21:37:10 -0700390 /**
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700391 * The MIME type of {@link #CONTENT_URI} providing a directory of
392 * people.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500393 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700394 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700395 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700396 public static final String CONTENT_TYPE = "vnd.android.cursor.dir/person";
397
398 /**
399 * The MIME type of a {@link #CONTENT_URI} subdirectory of a single
400 * person.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500401 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700402 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700403 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700404 public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/person";
405
406 /**
407 * The default sort order for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500408 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700409 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700410 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700411 public static final String DEFAULT_SORT_ORDER = People.NAME + " ASC";
412
413 /**
414 * The ID of the persons preferred phone number.
415 * <P>Type: INTEGER (foreign key to phones table on the _ID field)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500416 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700417 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700418 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700419 public static final String PRIMARY_PHONE_ID = "primary_phone";
420
421 /**
422 * The ID of the persons preferred email.
423 * <P>Type: INTEGER (foreign key to contact_methods table on the
424 * _ID field)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500425 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700426 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700427 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700428 public static final String PRIMARY_EMAIL_ID = "primary_email";
429
430 /**
431 * The ID of the persons preferred organization.
432 * <P>Type: INTEGER (foreign key to organizations table on the
433 * _ID field)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500434 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700435 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700436 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700437 public static final String PRIMARY_ORGANIZATION_ID = "primary_organization";
438
439 /**
440 * Mark a person as having been contacted.
441 *
442 * @param resolver the ContentResolver to use
443 * @param personId the person who was contacted
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500444 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700445 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700446 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700447 public static void markAsContacted(ContentResolver resolver, long personId) {
448 Uri uri = ContentUris.withAppendedId(CONTENT_URI, personId);
449 uri = Uri.withAppendedPath(uri, "update_contact_time");
450 ContentValues values = new ContentValues();
451 // There is a trigger in place that will update TIMES_CONTACTED when
452 // LAST_TIME_CONTACTED is modified.
453 values.put(LAST_TIME_CONTACTED, System.currentTimeMillis());
454 resolver.update(uri, values, null, null);
455 }
456
457 /**
Daisuke Miyakawa6e9610e2009-05-19 08:51:39 +0900458 * @hide Used in vCard parser code.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500459 * @deprecated see {@link android.provider.ContactsContract}
Daisuke Miyakawa6e9610e2009-05-19 08:51:39 +0900460 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700461 @Deprecated
Daisuke Miyakawa6e9610e2009-05-19 08:51:39 +0900462 public static long tryGetMyContactsGroupId(ContentResolver resolver) {
463 Cursor groupsCursor = resolver.query(Groups.CONTENT_URI, GROUPS_PROJECTION,
464 Groups.SYSTEM_ID + "='" + Groups.GROUP_MY_CONTACTS + "'", null, null);
465 if (groupsCursor != null) {
466 try {
467 if (groupsCursor.moveToFirst()) {
468 return groupsCursor.getLong(0);
469 }
470 } finally {
471 groupsCursor.close();
472 }
473 }
474 return 0;
475 }
476
477 /**
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700478 * Adds a person to the My Contacts group.
Daisuke Miyakawa6e9610e2009-05-19 08:51:39 +0900479 *
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700480 * @param resolver the resolver to use
481 * @param personId the person to add to the group
482 * @return the URI of the group membership row
483 * @throws IllegalStateException if the My Contacts group can't be found
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500484 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700485 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700486 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700487 public static Uri addToMyContactsGroup(ContentResolver resolver, long personId) {
Daisuke Miyakawa6e9610e2009-05-19 08:51:39 +0900488 long groupId = tryGetMyContactsGroupId(resolver);
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700489 if (groupId == 0) {
490 throw new IllegalStateException("Failed to find the My Contacts group");
491 }
Evan Millardc2da5f2009-06-18 16:07:13 -0700492
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700493 return addToGroup(resolver, personId, groupId);
494 }
495
496 /**
497 * Adds a person to a group referred to by name.
Evan Millardc2da5f2009-06-18 16:07:13 -0700498 *
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700499 * @param resolver the resolver to use
500 * @param personId the person to add to the group
501 * @param groupName the name of the group to add the contact to
502 * @return the URI of the group membership row
503 * @throws IllegalStateException if the group can't be found
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500504 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700505 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700506 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700507 public static Uri addToGroup(ContentResolver resolver, long personId, String groupName) {
508 long groupId = 0;
509 Cursor groupsCursor = resolver.query(Groups.CONTENT_URI, GROUPS_PROJECTION,
510 Groups.NAME + "=?", new String[] { groupName }, null);
511 if (groupsCursor != null) {
512 try {
513 if (groupsCursor.moveToFirst()) {
514 groupId = groupsCursor.getLong(0);
515 }
516 } finally {
517 groupsCursor.close();
518 }
519 }
520
521 if (groupId == 0) {
522 throw new IllegalStateException("Failed to find the My Contacts group");
523 }
Evan Millardc2da5f2009-06-18 16:07:13 -0700524
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700525 return addToGroup(resolver, personId, groupId);
526 }
527
528 /**
529 * Adds a person to a group.
Evan Millardc2da5f2009-06-18 16:07:13 -0700530 *
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700531 * @param resolver the resolver to use
532 * @param personId the person to add to the group
533 * @param groupId the group to add the person to
534 * @return the URI of the group membership row
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500535 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700536 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700537 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700538 public static Uri addToGroup(ContentResolver resolver, long personId, long groupId) {
539 ContentValues values = new ContentValues();
540 values.put(GroupMembership.PERSON_ID, personId);
541 values.put(GroupMembership.GROUP_ID, groupId);
542 return resolver.insert(GroupMembership.CONTENT_URI, values);
543 }
Evan Millardc2da5f2009-06-18 16:07:13 -0700544
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700545 private static final String[] GROUPS_PROJECTION = new String[] {
546 Groups._ID,
547 };
548
549 /**
550 * Creates a new contacts and adds it to the "My Contacts" group.
Evan Millardc2da5f2009-06-18 16:07:13 -0700551 *
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700552 * @param resolver the ContentResolver to use
553 * @param values the values to use when creating the contact
554 * @return the URI of the contact, or null if the operation fails
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500555 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700556 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700557 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700558 public static Uri createPersonInMyContactsGroup(ContentResolver resolver,
559 ContentValues values) {
560
561 Uri contactUri = resolver.insert(People.CONTENT_URI, values);
562 if (contactUri == null) {
563 Log.e(TAG, "Failed to create the contact");
564 return null;
565 }
566
567 if (addToMyContactsGroup(resolver, ContentUris.parseId(contactUri)) == null) {
568 resolver.delete(contactUri, null, null);
569 return null;
570 }
571 return contactUri;
572 }
573
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500574 /**
575 * @deprecated see {@link android.provider.ContactsContract}
576 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700577 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700578 public static Cursor queryGroups(ContentResolver resolver, long person) {
579 return resolver.query(GroupMembership.CONTENT_URI, null, "person=?",
580 new String[]{String.valueOf(person)}, Groups.DEFAULT_SORT_ORDER);
581 }
582
583 /**
584 * Set the photo for this person. data may be null
585 * @param cr the ContentResolver to use
586 * @param person the Uri of the person whose photo is to be updated
587 * @param data the byte[] that represents the photo
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500588 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700589 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700590 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700591 public static void setPhotoData(ContentResolver cr, Uri person, byte[] data) {
592 Uri photoUri = Uri.withAppendedPath(person, Contacts.Photos.CONTENT_DIRECTORY);
593 ContentValues values = new ContentValues();
594 values.put(Photos.DATA, data);
595 cr.update(photoUri, values, null, null);
596 }
Evan Millardc2da5f2009-06-18 16:07:13 -0700597
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700598 /**
599 * Opens an InputStream for the person's photo and returns the photo as a Bitmap.
600 * If the person's photo isn't present returns the placeholderImageResource instead.
601 * @param person the person whose photo should be used
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500602 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700603 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700604 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700605 public static InputStream openContactPhotoInputStream(ContentResolver cr, Uri person) {
606 Uri photoUri = Uri.withAppendedPath(person, Contacts.Photos.CONTENT_DIRECTORY);
607 Cursor cursor = cr.query(photoUri, new String[]{Photos.DATA}, null, null, null);
608 try {
Jeff Hamilton8d570b32009-09-17 11:51:32 -0500609 if (cursor == null || !cursor.moveToNext()) {
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700610 return null;
611 }
612 byte[] data = cursor.getBlob(0);
613 if (data == null) {
614 return null;
615 }
616 return new ByteArrayInputStream(data);
617 } finally {
Jeff Sharkey42fc2c62009-09-15 13:50:31 -0700618 if (cursor != null) cursor.close();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700619 }
620 }
621
622 /**
623 * Opens an InputStream for the person's photo and returns the photo as a Bitmap.
624 * If the person's photo isn't present returns the placeholderImageResource instead.
625 * @param context the Context
626 * @param person the person whose photo should be used
627 * @param placeholderImageResource the image resource to use if the person doesn't
628 * have a photo
629 * @param options the decoding options, can be set to null
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500630 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700631 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700632 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700633 public static Bitmap loadContactPhoto(Context context, Uri person,
634 int placeholderImageResource, BitmapFactory.Options options) {
635 if (person == null) {
636 return loadPlaceholderPhoto(placeholderImageResource, context, options);
637 }
638
639 InputStream stream = openContactPhotoInputStream(context.getContentResolver(), person);
640 Bitmap bm = stream != null ? BitmapFactory.decodeStream(stream, null, options) : null;
641 if (bm == null) {
642 bm = loadPlaceholderPhoto(placeholderImageResource, context, options);
643 }
644 return bm;
645 }
646
647 private static Bitmap loadPlaceholderPhoto(int placeholderImageResource, Context context,
648 BitmapFactory.Options options) {
649 if (placeholderImageResource == 0) {
650 return null;
651 }
652 return BitmapFactory.decodeResource(context.getResources(),
653 placeholderImageResource, options);
654 }
655
656 /**
657 * A sub directory of a single person that contains all of their Phones.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500658 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700659 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700660 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700661 public static final class Phones implements BaseColumns, PhonesColumns,
662 PeopleColumns {
663 /**
664 * no public constructor since this is a utility class
665 */
666 private Phones() {}
667
668 /**
669 * The directory twig for this sub-table
Dianne Hackborn29e4a3c2009-09-30 22:35:40 -0700670 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700671 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700672 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700673 public static final String CONTENT_DIRECTORY = "phones";
674
675 /**
676 * The default sort order for this table
Dianne Hackborn29e4a3c2009-09-30 22:35:40 -0700677 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700678 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700679 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700680 public static final String DEFAULT_SORT_ORDER = "number ASC";
681 }
682
683 /**
684 * A subdirectory of a single person that contains all of their
685 * ContactMethods.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500686 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700687 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700688 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700689 public static final class ContactMethods
690 implements BaseColumns, ContactMethodsColumns, PeopleColumns {
691 /**
692 * no public constructor since this is a utility class
693 */
694 private ContactMethods() {}
695
696 /**
697 * The directory twig for this sub-table
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500698 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700699 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700700 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700701 public static final String CONTENT_DIRECTORY = "contact_methods";
702
703 /**
704 * The default sort order for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500705 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700706 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700707 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700708 public static final String DEFAULT_SORT_ORDER = "data ASC";
709 }
710
711 /**
712 * The extensions for a person
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500713 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700714 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700715 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700716 public static class Extensions implements BaseColumns, ExtensionsColumns {
717 /**
718 * no public constructor since this is a utility class
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500719 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700720 */
721 private Extensions() {}
722
723 /**
724 * The directory twig for this sub-table
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500725 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700726 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700727 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700728 public static final String CONTENT_DIRECTORY = "extensions";
729
730 /**
731 * The default sort order for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500732 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700733 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700734 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700735 public static final String DEFAULT_SORT_ORDER = "name ASC";
736
737 /**
738 * The ID of the person this phone number is assigned to.
739 * <P>Type: INTEGER (long)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500740 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700741 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700742 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700743 public static final String PERSON_ID = "person";
744 }
745 }
746
747 /**
748 * Columns from the groups table.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500749 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700750 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700751 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700752 public interface GroupsColumns {
753 /**
754 * The group name.
755 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500756 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700757 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700758 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700759 public static final String NAME = "name";
760
761 /**
762 * Notes about the group.
763 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500764 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700765 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700766 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700767 public static final String NOTES = "notes";
768
769 /**
770 * Whether this group should be synced if the SYNC_EVERYTHING settings is false
771 * for this group's account.
772 * <P>Type: INTEGER (boolean)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500773 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700774 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700775 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700776 public static final String SHOULD_SYNC = "should_sync";
777
778 /**
779 * The ID of this group if it is a System Group, null otherwise.
780 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500781 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700782 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700783 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700784 public static final String SYSTEM_ID = "system_id";
785 }
786
787 /**
788 * This table contains the groups for an account.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500789 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700790 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700791 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700792 public static final class Groups
793 implements BaseColumns, SyncConstValue, GroupsColumns {
794 /**
795 * no public constructor since this is a utility class
796 */
797 private Groups() {}
798
799 /**
800 * The content:// style URL for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500801 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700802 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700803 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700804 public static final Uri CONTENT_URI =
805 Uri.parse("content://contacts/groups");
806
807 /**
808 * The content:// style URL for the table that holds the deleted
809 * groups.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500810 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700811 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700812 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700813 public static final Uri DELETED_CONTENT_URI =
814 Uri.parse("content://contacts/deleted_groups");
815
816 /**
817 * The MIME type of {@link #CONTENT_URI} providing a directory of
818 * groups.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500819 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700820 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700821 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700822 public static final String CONTENT_TYPE = "vnd.android.cursor.dir/contactsgroup";
823
824 /**
825 * The MIME type of a {@link #CONTENT_URI} subdirectory of a single
826 * group.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500827 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700828 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700829 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700830 public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/contactsgroup";
831
832 /**
833 * The default sort order for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500834 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700835 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700836 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700837 public static final String DEFAULT_SORT_ORDER = NAME + " ASC";
838
839 /**
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500840 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700841 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700842 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700843 public static final String GROUP_ANDROID_STARRED = "Starred in Android";
844
845 /**
846 * The "My Contacts" system group.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500847 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700848 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700849 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700850 public static final String GROUP_MY_CONTACTS = "Contacts";
851 }
852
853 /**
854 * Columns from the Phones table that other columns join into themselves.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500855 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700856 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700857 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700858 public interface PhonesColumns {
859 /**
860 * The type of the the phone number.
861 * <P>Type: INTEGER (one of the constants below)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500862 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700863 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700864 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700865 public static final String TYPE = "type";
866
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500867 /**
868 * @deprecated see {@link android.provider.ContactsContract}
869 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700870 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700871 public static final int TYPE_CUSTOM = 0;
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500872 /**
873 * @deprecated see {@link android.provider.ContactsContract}
874 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700875 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700876 public static final int TYPE_HOME = 1;
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500877 /**
878 * @deprecated see {@link android.provider.ContactsContract}
879 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700880 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700881 public static final int TYPE_MOBILE = 2;
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500882 /**
883 * @deprecated see {@link android.provider.ContactsContract}
884 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700885 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700886 public static final int TYPE_WORK = 3;
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500887 /**
888 * @deprecated see {@link android.provider.ContactsContract}
889 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700890 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700891 public static final int TYPE_FAX_WORK = 4;
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500892 /**
893 * @deprecated see {@link android.provider.ContactsContract}
894 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700895 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700896 public static final int TYPE_FAX_HOME = 5;
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500897 /**
898 * @deprecated see {@link android.provider.ContactsContract}
899 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700900 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700901 public static final int TYPE_PAGER = 6;
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500902 /**
903 * @deprecated see {@link android.provider.ContactsContract}
904 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700905 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700906 public static final int TYPE_OTHER = 7;
907
908 /**
909 * The user provided label for the phone number, only used if TYPE is TYPE_CUSTOM.
910 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500911 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700912 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700913 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700914 public static final String LABEL = "label";
915
916 /**
917 * The phone number as the user entered it.
918 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500919 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700920 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700921 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700922 public static final String NUMBER = "number";
923
924 /**
925 * The normalized phone number
926 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500927 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700928 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700929 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700930 public static final String NUMBER_KEY = "number_key";
931
932 /**
933 * Whether this is the primary phone number
934 * <P>Type: INTEGER (if set, non-0 means true)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500935 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700936 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700937 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700938 public static final String ISPRIMARY = "isprimary";
939 }
940
941 /**
942 * This table stores phone numbers and a reference to the person that the
943 * contact method belongs to. Phone numbers are stored separately from
944 * other contact methods to make caller ID lookup more efficient.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500945 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700946 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700947 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700948 public static final class Phones
949 implements BaseColumns, PhonesColumns, PeopleColumns {
950 /**
951 * no public constructor since this is a utility class
952 */
953 private Phones() {}
954
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500955 /**
956 * @deprecated see {@link android.provider.ContactsContract}
957 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700958 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700959 public static final CharSequence getDisplayLabel(Context context, int type,
960 CharSequence label, CharSequence[] labelArray) {
961 CharSequence display = "";
962
963 if (type != People.Phones.TYPE_CUSTOM) {
Evan Millardc2da5f2009-06-18 16:07:13 -0700964 CharSequence[] labels = labelArray != null? labelArray
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700965 : context.getResources().getTextArray(
966 com.android.internal.R.array.phoneTypes);
967 try {
968 display = labels[type - 1];
969 } catch (ArrayIndexOutOfBoundsException e) {
970 display = labels[People.Phones.TYPE_HOME - 1];
971 }
972 } else {
973 if (!TextUtils.isEmpty(label)) {
974 display = label;
975 }
976 }
977 return display;
978 }
979
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500980 /**
981 * @deprecated see {@link android.provider.ContactsContract}
982 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700983 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700984 public static final CharSequence getDisplayLabel(Context context, int type,
985 CharSequence label) {
986 return getDisplayLabel(context, type, label, null);
987 }
Evan Millardc2da5f2009-06-18 16:07:13 -0700988
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700989 /**
990 * The content:// style URL for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500991 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700992 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700993 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700994 public static final Uri CONTENT_URI =
995 Uri.parse("content://contacts/phones");
996
997 /**
998 * The content:// style URL for filtering phone numbers
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500999 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001000 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001001 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001002 public static final Uri CONTENT_FILTER_URL =
1003 Uri.parse("content://contacts/phones/filter");
1004
1005 /**
1006 * The MIME type of {@link #CONTENT_URI} providing a directory of
1007 * phones.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001008 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001009 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001010 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001011 public static final String CONTENT_TYPE = "vnd.android.cursor.dir/phone";
1012
1013 /**
1014 * The MIME type of a {@link #CONTENT_URI} subdirectory of a single
1015 * phone.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001016 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001017 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001018 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001019 public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/phone";
1020
1021 /**
1022 * The default sort order for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001023 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001024 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001025 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001026 public static final String DEFAULT_SORT_ORDER = "name ASC";
1027
1028 /**
1029 * The ID of the person this phone number is assigned to.
1030 * <P>Type: INTEGER (long)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001031 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001032 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001033 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001034 public static final String PERSON_ID = "person";
1035 }
1036
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001037 /**
1038 * @deprecated see {@link android.provider.ContactsContract}
1039 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001040 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001041 public static final class GroupMembership implements BaseColumns, GroupsColumns {
1042 /**
1043 * no public constructor since this is a utility class
1044 */
1045 private GroupMembership() {}
1046
1047 /**
1048 * The content:// style URL for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001049 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001050 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001051 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001052 public static final Uri CONTENT_URI =
1053 Uri.parse("content://contacts/groupmembership");
1054
1055 /**
1056 * The content:// style URL for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001057 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001058 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001059 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001060 public static final Uri RAW_CONTENT_URI =
1061 Uri.parse("content://contacts/groupmembershipraw");
1062
1063 /**
1064 * The directory twig for this sub-table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001065 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001066 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001067 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001068 public static final String CONTENT_DIRECTORY = "groupmembership";
Jeff Sharkey534aa012009-08-25 14:33:44 -07001069
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001070 /**
1071 * The MIME type of {@link #CONTENT_URI} providing a directory of all
1072 * person groups.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001073 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001074 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001075 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001076 public static final String CONTENT_TYPE = "vnd.android.cursor.dir/contactsgroupmembership";
1077
1078 /**
1079 * The MIME type of a {@link #CONTENT_URI} subdirectory of a single
1080 * person group.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001081 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001082 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001083 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001084 public static final String CONTENT_ITEM_TYPE =
1085 "vnd.android.cursor.item/contactsgroupmembership";
1086
1087 /**
1088 * The default sort order for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001089 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001090 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001091 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001092 public static final String DEFAULT_SORT_ORDER = "group_id ASC";
1093
1094 /**
1095 * The row id of the accounts group.
1096 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001097 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001098 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001099 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001100 public static final String GROUP_ID = "group_id";
1101
1102 /**
1103 * The sync id of the group.
1104 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001105 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001106 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001107 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001108 public static final String GROUP_SYNC_ID = "group_sync_id";
1109
1110 /**
1111 * The account of the group.
1112 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001113 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001114 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001115 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001116 public static final String GROUP_SYNC_ACCOUNT = "group_sync_account";
1117
1118 /**
Fred Quintanad9d2f112009-04-23 13:36:27 -07001119 * The account type of the group.
1120 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001121 * @deprecated see {@link android.provider.ContactsContract}
Fred Quintanad9d2f112009-04-23 13:36:27 -07001122 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001123 @Deprecated
Fred Quintanad9d2f112009-04-23 13:36:27 -07001124 public static final String GROUP_SYNC_ACCOUNT_TYPE = "group_sync_account_type";
1125
1126 /**
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001127 * The row id of the person.
1128 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001129 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001130 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001131 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001132 public static final String PERSON_ID = "person";
1133 }
1134
1135 /**
1136 * Columns from the ContactMethods table that other tables join into
1137 * themseleves.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001138 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001139 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001140 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001141 public interface ContactMethodsColumns {
1142 /**
1143 * The kind of the the contact method. For example, email address,
1144 * postal address, etc.
1145 * <P>Type: INTEGER (one of the values below)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001146 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001147 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001148 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001149 public static final String KIND = "kind";
1150
1151 /**
1152 * The type of the contact method, must be one of the types below.
1153 * <P>Type: INTEGER (one of the values below)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001154 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001155 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001156 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001157 public static final String TYPE = "type";
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001158 /**
1159 * @deprecated see {@link android.provider.ContactsContract}
1160 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001161 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001162 public static final int TYPE_CUSTOM = 0;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001163 /**
1164 * @deprecated see {@link android.provider.ContactsContract}
1165 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001166 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001167 public static final int TYPE_HOME = 1;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001168 /**
1169 * @deprecated see {@link android.provider.ContactsContract}
1170 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001171 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001172 public static final int TYPE_WORK = 2;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001173 /**
1174 * @deprecated see {@link android.provider.ContactsContract}
1175 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001176 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001177 public static final int TYPE_OTHER = 3;
1178
1179 /**
Daisuke Miyakawa7c3e18c52009-05-19 23:13:14 +09001180 * @hide This is temporal. TYPE_MOBILE should be added to TYPE in the future.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001181 * @deprecated see {@link android.provider.ContactsContract}
Daisuke Miyakawa7c3e18c52009-05-19 23:13:14 +09001182 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001183 @Deprecated
Daisuke Miyakawa7c3e18c52009-05-19 23:13:14 +09001184 public static final int MOBILE_EMAIL_TYPE_INDEX = 2;
1185
1186 /**
1187 * @hide This is temporal. TYPE_MOBILE should be added to TYPE in the future.
1188 * This is not "mobile" but "CELL" since vCard uses it for identifying mobile phone.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001189 * @deprecated see {@link android.provider.ContactsContract}
Daisuke Miyakawa7c3e18c52009-05-19 23:13:14 +09001190 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001191 @Deprecated
Daisuke Miyakawa7c3e18c52009-05-19 23:13:14 +09001192 public static final String MOBILE_EMAIL_TYPE_NAME = "_AUTO_CELL";
1193
1194 /**
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001195 * The user defined label for the the contact method.
1196 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001197 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001198 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001199 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001200 public static final String LABEL = "label";
1201
1202 /**
1203 * The data for the contact method.
1204 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001205 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001206 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001207 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001208 public static final String DATA = "data";
1209
1210 /**
1211 * Auxiliary data for the contact method.
1212 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001213 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001214 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001215 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001216 public static final String AUX_DATA = "aux_data";
1217
1218 /**
1219 * Whether this is the primary organization
1220 * <P>Type: INTEGER (if set, non-0 means true)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001221 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001222 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001223 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001224 public static final String ISPRIMARY = "isprimary";
1225 }
1226
1227 /**
1228 * This table stores all non-phone contact methods and a reference to the
1229 * person that the contact method belongs to.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001230 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001231 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001232 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001233 public static final class ContactMethods
1234 implements BaseColumns, ContactMethodsColumns, PeopleColumns {
1235 /**
1236 * The column with latitude data for postal locations
1237 * <P>Type: REAL</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001238 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001239 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001240 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001241 public static final String POSTAL_LOCATION_LATITUDE = DATA;
1242
1243 /**
1244 * The column with longitude data for postal locations
1245 * <P>Type: REAL</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001246 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001247 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001248 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001249 public static final String POSTAL_LOCATION_LONGITUDE = AUX_DATA;
1250
1251 /**
1252 * The predefined IM protocol types. The protocol can either be non-present, one
1253 * of these types, or a free-form string. These cases are encoded in the AUX_DATA
1254 * column as:
1255 * - null
1256 * - pre:<an integer, one of the protocols below>
1257 * - custom:<a string>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001258 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001259 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001260 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001261 public static final int PROTOCOL_AIM = 0;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001262 /**
1263 * @deprecated see {@link android.provider.ContactsContract}
1264 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001265 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001266 public static final int PROTOCOL_MSN = 1;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001267 /**
1268 * @deprecated see {@link android.provider.ContactsContract}
1269 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001270 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001271 public static final int PROTOCOL_YAHOO = 2;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001272 /**
1273 * @deprecated see {@link android.provider.ContactsContract}
1274 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001275 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001276 public static final int PROTOCOL_SKYPE = 3;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001277 /**
1278 * @deprecated see {@link android.provider.ContactsContract}
1279 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001280 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001281 public static final int PROTOCOL_QQ = 4;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001282 /**
1283 * @deprecated see {@link android.provider.ContactsContract}
1284 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001285 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001286 public static final int PROTOCOL_GOOGLE_TALK = 5;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001287 /**
1288 * @deprecated see {@link android.provider.ContactsContract}
1289 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001290 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001291 public static final int PROTOCOL_ICQ = 6;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001292 /**
1293 * @deprecated see {@link android.provider.ContactsContract}
1294 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001295 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001296 public static final int PROTOCOL_JABBER = 7;
1297
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001298 /**
1299 * @deprecated see {@link android.provider.ContactsContract}
1300 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001301 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001302 public static String encodePredefinedImProtocol(int protocol) {
1303 return "pre:" + protocol;
1304 }
1305
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001306 /**
1307 * @deprecated see {@link android.provider.ContactsContract}
1308 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001309 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001310 public static String encodeCustomImProtocol(String protocolString) {
1311 return "custom:" + protocolString;
1312 }
1313
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001314 /**
1315 * @deprecated see {@link android.provider.ContactsContract}
1316 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001317 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001318 public static Object decodeImProtocol(String encodedString) {
1319 if (encodedString == null) {
1320 return null;
1321 }
1322
1323 if (encodedString.startsWith("pre:")) {
1324 return Integer.parseInt(encodedString.substring(4));
1325 }
1326
1327 if (encodedString.startsWith("custom:")) {
1328 return encodedString.substring(7);
1329 }
1330
1331 throw new IllegalArgumentException(
1332 "the value is not a valid encoded protocol, " + encodedString);
1333 }
Evan Millardc2da5f2009-06-18 16:07:13 -07001334
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001335 /**
Jeff Hamiltonf3960b12009-11-20 20:04:03 -08001336 * TODO find a place to put the canonical version of these.
1337 */
1338 interface ProviderNames {
1339 //
1340 //NOTE: update Contacts.java with new providers when they're added.
1341 //
1342 String YAHOO = "Yahoo";
1343 String GTALK = "GTalk";
1344 String MSN = "MSN";
1345 String ICQ = "ICQ";
1346 String AIM = "AIM";
1347 String XMPP = "XMPP";
1348 String JABBER = "JABBER";
1349 String SKYPE = "SKYPE";
1350 String QQ = "QQ";
1351 }
1352
1353 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001354 * This looks up the provider name defined in
Jeff Hamiltonf3960b12009-11-20 20:04:03 -08001355 * from the predefined IM protocol id.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001356 * This is used for interacting with the IM application.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001357 *
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001358 * @param protocol the protocol ID
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001359 * @return the provider name the IM app uses for the given protocol, or null if no
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001360 * provider is defined for the given protocol
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001361 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001362 * @hide
1363 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001364 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001365 public static String lookupProviderNameFromId(int protocol) {
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001366 switch (protocol) {
1367 case PROTOCOL_GOOGLE_TALK:
Jeff Hamiltonf3960b12009-11-20 20:04:03 -08001368 return ProviderNames.GTALK;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001369 case PROTOCOL_AIM:
Jeff Hamiltonf3960b12009-11-20 20:04:03 -08001370 return ProviderNames.AIM;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001371 case PROTOCOL_MSN:
Jeff Hamiltonf3960b12009-11-20 20:04:03 -08001372 return ProviderNames.MSN;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001373 case PROTOCOL_YAHOO:
Jeff Hamiltonf3960b12009-11-20 20:04:03 -08001374 return ProviderNames.YAHOO;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001375 case PROTOCOL_ICQ:
Jeff Hamiltonf3960b12009-11-20 20:04:03 -08001376 return ProviderNames.ICQ;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001377 case PROTOCOL_JABBER:
Jeff Hamiltonf3960b12009-11-20 20:04:03 -08001378 return ProviderNames.JABBER;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001379 case PROTOCOL_SKYPE:
Jeff Hamiltonf3960b12009-11-20 20:04:03 -08001380 return ProviderNames.SKYPE;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001381 case PROTOCOL_QQ:
Jeff Hamiltonf3960b12009-11-20 20:04:03 -08001382 return ProviderNames.QQ;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001383 }
1384 return null;
1385 }
1386
1387 /**
1388 * no public constructor since this is a utility class
1389 */
1390 private ContactMethods() {}
1391
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001392 /**
1393 * @deprecated see {@link android.provider.ContactsContract}
1394 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001395 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001396 public static final CharSequence getDisplayLabel(Context context, int kind,
1397 int type, CharSequence label) {
1398 CharSequence display = "";
1399 switch (kind) {
1400 case KIND_EMAIL: {
1401 if (type != People.ContactMethods.TYPE_CUSTOM) {
1402 CharSequence[] labels = context.getResources().getTextArray(
1403 com.android.internal.R.array.emailAddressTypes);
1404 try {
1405 display = labels[type - 1];
1406 } catch (ArrayIndexOutOfBoundsException e) {
1407 display = labels[ContactMethods.TYPE_HOME - 1];
1408 }
1409 } else {
1410 if (!TextUtils.isEmpty(label)) {
1411 display = label;
1412 }
1413 }
1414 break;
1415 }
1416
1417 case KIND_POSTAL: {
1418 if (type != People.ContactMethods.TYPE_CUSTOM) {
1419 CharSequence[] labels = context.getResources().getTextArray(
1420 com.android.internal.R.array.postalAddressTypes);
1421 try {
1422 display = labels[type - 1];
1423 } catch (ArrayIndexOutOfBoundsException e) {
1424 display = labels[ContactMethods.TYPE_HOME - 1];
1425 }
1426 } else {
1427 if (!TextUtils.isEmpty(label)) {
1428 display = label;
1429 }
1430 }
1431 break;
1432 }
1433
1434 default:
1435 display = context.getString(R.string.untitled);
1436 }
1437 return display;
1438 }
1439
1440 /**
1441 * Add a longitude and latitude location to a postal address.
1442 *
1443 * @param context the context to use when updating the database
1444 * @param postalId the address to update
1445 * @param latitude the latitude for the address
1446 * @param longitude the longitude for the address
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001447 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001448 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001449 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001450 public void addPostalLocation(Context context, long postalId,
1451 double latitude, double longitude) {
1452 final ContentResolver resolver = context.getContentResolver();
1453 // Insert the location
1454 ContentValues values = new ContentValues(2);
1455 values.put(POSTAL_LOCATION_LATITUDE, latitude);
1456 values.put(POSTAL_LOCATION_LONGITUDE, longitude);
1457 Uri loc = resolver.insert(CONTENT_URI, values);
1458 long locId = ContentUris.parseId(loc);
1459
1460 // Update the postal address
1461 values.clear();
1462 values.put(AUX_DATA, locId);
1463 resolver.update(ContentUris.withAppendedId(CONTENT_URI, postalId), values, null, null);
1464 }
1465
1466 /**
1467 * The content:// style URL for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001468 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001469 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001470 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001471 public static final Uri CONTENT_URI =
1472 Uri.parse("content://contacts/contact_methods");
1473
1474 /**
1475 * The content:// style URL for sub-directory of e-mail addresses.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001476 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001477 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001478 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001479 public static final Uri CONTENT_EMAIL_URI =
1480 Uri.parse("content://contacts/contact_methods/email");
1481
1482 /**
1483 * The MIME type of {@link #CONTENT_URI} providing a directory of
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001484 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001485 * phones.
1486 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001487 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001488 public static final String CONTENT_TYPE = "vnd.android.cursor.dir/contact-methods";
1489
1490 /**
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001491 * The MIME type of a {@link #CONTENT_EMAIL_URI} sub-directory of
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001492 * multiple {@link Contacts#KIND_EMAIL} entries.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001493 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001494 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001495 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001496 public static final String CONTENT_EMAIL_TYPE = "vnd.android.cursor.dir/email";
1497
1498 /**
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001499 * The MIME type of a {@link #CONTENT_EMAIL_URI} sub-directory of
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001500 * multiple {@link Contacts#KIND_POSTAL} entries.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001501 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001502 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001503 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001504 public static final String CONTENT_POSTAL_TYPE = "vnd.android.cursor.dir/postal-address";
1505
1506 /**
1507 * The MIME type of a {@link #CONTENT_URI} sub-directory of a single
1508 * {@link Contacts#KIND_EMAIL} entry.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001509 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001510 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001511 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001512 public static final String CONTENT_EMAIL_ITEM_TYPE = "vnd.android.cursor.item/email";
1513
1514 /**
1515 * The MIME type of a {@link #CONTENT_URI} sub-directory of a single
1516 * {@link Contacts#KIND_POSTAL} entry.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001517 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001518 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001519 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001520 public static final String CONTENT_POSTAL_ITEM_TYPE
1521 = "vnd.android.cursor.item/postal-address";
1522
1523 /**
1524 * The MIME type of a {@link #CONTENT_URI} sub-directory of a single
1525 * {@link Contacts#KIND_IM} entry.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001526 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001527 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001528 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001529 public static final String CONTENT_IM_ITEM_TYPE = "vnd.android.cursor.item/jabber-im";
1530
1531 /**
1532 * The default sort order for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001533 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001534 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001535 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001536 public static final String DEFAULT_SORT_ORDER = "name ASC";
1537
1538 /**
1539 * The ID of the person this contact method is assigned to.
1540 * <P>Type: INTEGER (long)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001541 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001542 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001543 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001544 public static final String PERSON_ID = "person";
1545 }
1546
1547 /**
1548 * The IM presence columns with some contacts specific columns mixed in.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001549 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001550 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001551 @Deprecated
Jeff Hamiltonf3960b12009-11-20 20:04:03 -08001552 public interface PresenceColumns {
1553 /**
1554 * The priority, an integer, used by XMPP presence
1555 * <P>Type: INTEGER</P>
1556 */
1557 String PRIORITY = "priority";
1558
1559 /**
1560 * The server defined status.
1561 * <P>Type: INTEGER (one of the values below)</P>
1562 */
1563 String PRESENCE_STATUS = ContactsContract.StatusUpdates.PRESENCE;
1564
1565 /**
1566 * Presence Status definition
1567 */
1568 int OFFLINE = ContactsContract.StatusUpdates.OFFLINE;
1569 int INVISIBLE = ContactsContract.StatusUpdates.INVISIBLE;
1570 int AWAY = ContactsContract.StatusUpdates.AWAY;
1571 int IDLE = ContactsContract.StatusUpdates.IDLE;
1572 int DO_NOT_DISTURB = ContactsContract.StatusUpdates.DO_NOT_DISTURB;
1573 int AVAILABLE = ContactsContract.StatusUpdates.AVAILABLE;
1574
1575 /**
1576 * The user defined status line.
1577 * <P>Type: TEXT</P>
1578 */
1579 String PRESENCE_CUSTOM_STATUS = ContactsContract.StatusUpdates.STATUS;
1580
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001581 /**
1582 * The IM service the presence is coming from. Formatted using either
1583 * {@link Contacts.ContactMethods#encodePredefinedImProtocol} or
1584 * {@link Contacts.ContactMethods#encodeCustomImProtocol}.
1585 * <P>Type: STRING</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001586 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001587 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001588 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001589 public static final String IM_PROTOCOL = "im_protocol";
1590
1591 /**
1592 * The IM handle the presence item is for. The handle is scoped to
1593 * the {@link #IM_PROTOCOL}.
1594 * <P>Type: STRING</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001595 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001596 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001597 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001598 public static final String IM_HANDLE = "im_handle";
1599
1600 /**
1601 * The IM account for the local user that the presence data came from.
1602 * <P>Type: STRING</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001603 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001604 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001605 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001606 public static final String IM_ACCOUNT = "im_account";
1607 }
1608
1609 /**
1610 * Contains presence information about contacts.
1611 * @hide
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001612 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001613 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001614 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001615 public static final class Presence
1616 implements BaseColumns, PresenceColumns, PeopleColumns {
1617 /**
1618 * The content:// style URL for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001619 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001620 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001621 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001622 public static final Uri CONTENT_URI =
1623 Uri.parse("content://contacts/presence");
1624
1625 /**
1626 * The ID of the person this presence item is assigned to.
1627 * <P>Type: INTEGER (long)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001628 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001629 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001630 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001631 public static final String PERSON_ID = "person";
1632
1633 /**
1634 * Gets the resource ID for the proper presence icon.
Evan Millardc2da5f2009-06-18 16:07:13 -07001635 *
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001636 * @param status the status to get the icon for
1637 * @return the resource ID for the proper presence icon
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001638 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001639 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001640 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001641 public static final int getPresenceIconResourceId(int status) {
1642 switch (status) {
1643 case Contacts.People.AVAILABLE:
1644 return com.android.internal.R.drawable.presence_online;
Evan Millardc2da5f2009-06-18 16:07:13 -07001645
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001646 case Contacts.People.IDLE:
1647 case Contacts.People.AWAY:
1648 return com.android.internal.R.drawable.presence_away;
Evan Millardc2da5f2009-06-18 16:07:13 -07001649
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001650 case Contacts.People.DO_NOT_DISTURB:
1651 return com.android.internal.R.drawable.presence_busy;
Evan Millardc2da5f2009-06-18 16:07:13 -07001652
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001653 case Contacts.People.INVISIBLE:
1654 return com.android.internal.R.drawable.presence_invisible;
Evan Millardc2da5f2009-06-18 16:07:13 -07001655
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001656 case Contacts.People.OFFLINE:
1657 default:
1658 return com.android.internal.R.drawable.presence_offline;
1659 }
1660 }
1661
1662 /**
1663 * Sets a presence icon to the proper graphic
1664 *
1665 * @param icon the icon to to set
1666 * @param serverStatus that status
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001667 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001668 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001669 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001670 public static final void setPresenceIcon(ImageView icon, int serverStatus) {
1671 icon.setImageResource(getPresenceIconResourceId(serverStatus));
1672 }
1673 }
1674
1675 /**
1676 * Columns from the Organizations table that other columns join into themselves.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001677 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001678 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001679 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001680 public interface OrganizationColumns {
1681 /**
Evan JIANGae499952008-11-02 09:47:52 +08001682 * The type of the organizations.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001683 * <P>Type: INTEGER (one of the constants below)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001684 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001685 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001686 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001687 public static final String TYPE = "type";
1688
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001689 /**
1690 * @deprecated see {@link android.provider.ContactsContract}
1691 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001692 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001693 public static final int TYPE_CUSTOM = 0;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001694 /**
1695 * @deprecated see {@link android.provider.ContactsContract}
1696 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001697 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001698 public static final int TYPE_WORK = 1;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001699 /**
1700 * @deprecated see {@link android.provider.ContactsContract}
1701 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001702 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001703 public static final int TYPE_OTHER = 2;
1704
1705 /**
1706 * The user provided label, only used if TYPE is TYPE_CUSTOM.
1707 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001708 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001709 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001710 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001711 public static final String LABEL = "label";
1712
1713 /**
1714 * The name of the company for this organization.
1715 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001716 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001717 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001718 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001719 public static final String COMPANY = "company";
1720
1721 /**
1722 * The title within this organization.
1723 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001724 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001725 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001726 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001727 public static final String TITLE = "title";
1728
1729 /**
1730 * The person this organization is tied to.
1731 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001732 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001733 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001734 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001735 public static final String PERSON_ID = "person";
1736
1737 /**
1738 * Whether this is the primary organization
1739 * <P>Type: INTEGER (if set, non-0 means true)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001740 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001741 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001742 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001743 public static final String ISPRIMARY = "isprimary";
1744 }
1745
1746 /**
1747 * A sub directory of a single person that contains all of their Phones.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001748 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001749 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001750 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001751 public static final class Organizations implements BaseColumns, OrganizationColumns {
1752 /**
1753 * no public constructor since this is a utility class
1754 */
1755 private Organizations() {}
1756
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001757 /**
1758 * @deprecated see {@link android.provider.ContactsContract}
1759 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001760 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001761 public static final CharSequence getDisplayLabel(Context context, int type,
1762 CharSequence label) {
1763 CharSequence display = "";
1764
1765 if (type != TYPE_CUSTOM) {
1766 CharSequence[] labels = context.getResources().getTextArray(
1767 com.android.internal.R.array.organizationTypes);
1768 try {
1769 display = labels[type - 1];
1770 } catch (ArrayIndexOutOfBoundsException e) {
Evan JIANGae499952008-11-02 09:47:52 +08001771 display = labels[Organizations.TYPE_WORK - 1];
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001772 }
1773 } else {
1774 if (!TextUtils.isEmpty(label)) {
1775 display = label;
1776 }
1777 }
1778 return display;
1779 }
1780
1781 /**
1782 * The content:// style URL for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001783 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001784 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001785 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001786 public static final Uri CONTENT_URI =
1787 Uri.parse("content://contacts/organizations");
1788
1789 /**
1790 * The directory twig for this sub-table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001791 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001792 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001793 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001794 public static final String CONTENT_DIRECTORY = "organizations";
1795
1796 /**
1797 * The default sort order for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001798 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001799 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001800 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001801 public static final String DEFAULT_SORT_ORDER = "company, title, isprimary ASC";
1802 }
1803
1804 /**
1805 * Columns from the Photos table that other columns join into themselves.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001806 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001807 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001808 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001809 public interface PhotosColumns {
1810 /**
1811 * The _SYNC_VERSION of the photo that was last downloaded
1812 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001813 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001814 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001815 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001816 public static final String LOCAL_VERSION = "local_version";
1817
1818 /**
1819 * The person this photo is associated with.
1820 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001821 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001822 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001823 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001824 public static final String PERSON_ID = "person";
1825
1826 /**
1827 * non-zero if a download is required and the photo isn't marked as a bad resource.
1828 * You must specify this in the columns in order to use it in the where clause.
1829 * <P>Type: INTEGER(boolean)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001830 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001831 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001832 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001833 public static final String DOWNLOAD_REQUIRED = "download_required";
1834
1835 /**
1836 * non-zero if this photo is known to exist on the server
1837 * <P>Type: INTEGER(boolean)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001838 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001839 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001840 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001841 public static final String EXISTS_ON_SERVER = "exists_on_server";
1842
1843 /**
1844 * Contains the description of the upload or download error from
1845 * the previous attempt. If null then the previous attempt succeeded.
1846 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001847 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001848 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001849 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001850 public static final String SYNC_ERROR = "sync_error";
1851
1852 /**
1853 * The image data, or null if there is no image.
1854 * <P>Type: BLOB</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001855 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001856 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001857 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001858 public static final String DATA = "data";
1859
1860 }
1861
1862 /**
1863 * The photos over all of the people
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001864 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001865 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001866 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001867 public static final class Photos implements BaseColumns, PhotosColumns, SyncConstValue {
1868 /**
1869 * no public constructor since this is a utility class
1870 */
1871 private Photos() {}
1872
1873 /**
1874 * The content:// style URL for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001875 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001876 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001877 @Deprecated
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001878 public static final Uri CONTENT_URI = Uri.parse("content://contacts/photos");
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001879
1880 /**
1881 * The directory twig for this sub-table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001882 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001883 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001884 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001885 public static final String CONTENT_DIRECTORY = "photo";
1886
1887 /**
1888 * The default sort order for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001889 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001890 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001891 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001892 public static final String DEFAULT_SORT_ORDER = "person ASC";
1893 }
1894
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001895 /**
1896 * @deprecated see {@link android.provider.ContactsContract}
1897 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001898 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001899 public interface ExtensionsColumns {
1900 /**
1901 * The name of this extension. May not be null. There may be at most one row for each name.
1902 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001903 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001904 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001905 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001906 public static final String NAME = "name";
1907
1908 /**
1909 * The value of this extension. May not be null.
1910 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001911 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001912 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001913 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001914 public static final String VALUE = "value";
1915 }
1916
1917 /**
1918 * The extensions for a person
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001919 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001920 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001921 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001922 public static final class Extensions implements BaseColumns, ExtensionsColumns {
1923 /**
1924 * no public constructor since this is a utility class
1925 */
1926 private Extensions() {}
1927
1928 /**
1929 * The content:// style URL for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001930 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001931 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001932 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001933 public static final Uri CONTENT_URI =
1934 Uri.parse("content://contacts/extensions");
1935
1936 /**
1937 * The MIME type of {@link #CONTENT_URI} providing a directory of
1938 * phones.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001939 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001940 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001941 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001942 public static final String CONTENT_TYPE = "vnd.android.cursor.dir/contact_extensions";
1943
1944 /**
1945 * The MIME type of a {@link #CONTENT_URI} subdirectory of a single
1946 * phone.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001947 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001948 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001949 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001950 public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/contact_extensions";
Jeff Sharkey534aa012009-08-25 14:33:44 -07001951
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001952 /**
1953 * The default sort order for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001954 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001955 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001956 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001957 public static final String DEFAULT_SORT_ORDER = "person, name ASC";
1958
1959 /**
1960 * The ID of the person this phone number is assigned to.
1961 * <P>Type: INTEGER (long)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001962 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001963 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001964 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001965 public static final String PERSON_ID = "person";
1966 }
1967
1968 /**
1969 * Contains helper classes used to create or manage {@link android.content.Intent Intents}
1970 * that involve contacts.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001971 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001972 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001973 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001974 public static final class Intents {
Dianne Hackborn29e4a3c2009-09-30 22:35:40 -07001975 /**
1976 * @deprecated see {@link android.provider.ContactsContract}
1977 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001978 @Deprecated
1979 public Intents() {
1980 }
1981
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001982 /**
1983 * This is the intent that is fired when a search suggestion is clicked on.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001984 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001985 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001986 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001987 public static final String SEARCH_SUGGESTION_CLICKED =
Evan Millardc2da5f2009-06-18 16:07:13 -07001988 ContactsContract.Intents.SEARCH_SUGGESTION_CLICKED;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001989
1990 /**
Evan Millardc2da5f2009-06-18 16:07:13 -07001991 * This is the intent that is fired when a search suggestion for dialing a number
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001992 * is clicked on.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001993 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001994 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001995 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001996 public static final String SEARCH_SUGGESTION_DIAL_NUMBER_CLICKED =
Evan Millardc2da5f2009-06-18 16:07:13 -07001997 ContactsContract.Intents.SEARCH_SUGGESTION_DIAL_NUMBER_CLICKED;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001998
1999 /**
2000 * This is the intent that is fired when a search suggestion for creating a contact
2001 * is clicked on.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002002 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002003 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002004 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002005 public static final String SEARCH_SUGGESTION_CREATE_CONTACT_CLICKED =
Evan Millardc2da5f2009-06-18 16:07:13 -07002006 ContactsContract.Intents.SEARCH_SUGGESTION_CREATE_CONTACT_CLICKED;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002007
2008 /**
2009 * Starts an Activity that lets the user pick a contact to attach an image to.
2010 * After picking the contact it launches the image cropper in face detection mode.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002011 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002012 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002013 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002014 public static final String ATTACH_IMAGE = ContactsContract.Intents.ATTACH_IMAGE;
The Android Open Source Projectc39a6e02009-03-11 12:11:56 -07002015
2016 /**
2017 * Takes as input a data URI with a mailto: or tel: scheme. If a single
2018 * contact exists with the given data it will be shown. If no contact
2019 * exists, a dialog will ask the user if they want to create a new
2020 * contact with the provided details filled in. If multiple contacts
2021 * share the data the user will be prompted to pick which contact they
2022 * want to view.
2023 * <p>
2024 * For <code>mailto:</code> URIs, the scheme specific portion must be a
2025 * raw email address, such as one built using
2026 * {@link Uri#fromParts(String, String, String)}.
2027 * <p>
2028 * For <code>tel:</code> URIs, the scheme specific portion is compared
2029 * to existing numbers using the standard caller ID lookup algorithm.
2030 * The number must be properly encoded, for example using
2031 * {@link Uri#fromParts(String, String, String)}.
2032 * <p>
2033 * Any extras from the {@link Insert} class will be passed along to the
2034 * create activity if there are no contacts to show.
2035 * <p>
2036 * Passing true for the {@link #EXTRA_FORCE_CREATE} extra will skip
2037 * prompting the user when the contact doesn't exist.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002038 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectc39a6e02009-03-11 12:11:56 -07002039 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002040 @Deprecated
The Android Open Source Projectc39a6e02009-03-11 12:11:56 -07002041 public static final String SHOW_OR_CREATE_CONTACT =
Evan Millardc2da5f2009-06-18 16:07:13 -07002042 ContactsContract.Intents.SHOW_OR_CREATE_CONTACT;
The Android Open Source Projectc39a6e02009-03-11 12:11:56 -07002043
2044 /**
The Android Open Source Project10592532009-03-18 17:39:46 -07002045 * Used with {@link #SHOW_OR_CREATE_CONTACT} to force creating a new
2046 * contact if no matching contact found. Otherwise, default behavior is
2047 * to prompt user with dialog before creating.
2048 * <p>
2049 * Type: BOOLEAN
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002050 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectc39a6e02009-03-11 12:11:56 -07002051 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002052 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002053 public static final String EXTRA_FORCE_CREATE = ContactsContract.Intents.EXTRA_FORCE_CREATE;
2054
The Android Open Source Project10592532009-03-18 17:39:46 -07002055 /**
2056 * Used with {@link #SHOW_OR_CREATE_CONTACT} to specify an exact
2057 * description to be shown when prompting user about creating a new
2058 * contact.
2059 * <p>
2060 * Type: STRING
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002061 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project10592532009-03-18 17:39:46 -07002062 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002063 @Deprecated
The Android Open Source Project10592532009-03-18 17:39:46 -07002064 public static final String EXTRA_CREATE_DESCRIPTION =
Evan Millardc2da5f2009-06-18 16:07:13 -07002065 ContactsContract.Intents.EXTRA_CREATE_DESCRIPTION;
The Android Open Source Projectc39a6e02009-03-11 12:11:56 -07002066
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002067 /**
Jeff Sharkey11322002009-06-04 17:25:51 -07002068 * Optional extra used with {@link #SHOW_OR_CREATE_CONTACT} to specify a
2069 * dialog location using screen coordinates. When not specified, the
2070 * dialog will be centered.
2071 *
2072 * @hide pending API council review
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002073 * @deprecated see {@link android.provider.ContactsContract}
Jeff Sharkey11322002009-06-04 17:25:51 -07002074 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002075 @Deprecated
Jeff Sharkey11322002009-06-04 17:25:51 -07002076 public static final String EXTRA_TARGET_RECT = ContactsContract.Intents.EXTRA_TARGET_RECT;
2077
2078 /**
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002079 * Intents related to the Contacts app UI.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002080 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002081 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002082 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002083 public static final class UI {
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002084 /**
2085 * @deprecated see {@link android.provider.ContactsContract}
2086 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002087 @Deprecated
2088 public UI() {
2089 }
2090
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002091 /**
2092 * The action for the default contacts list tab.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002093 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002094 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002095 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002096 public static final String LIST_DEFAULT = ContactsContract.Intents.UI.LIST_DEFAULT;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002097
2098 /**
2099 * The action for the contacts list tab.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002100 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002101 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002102 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002103 public static final String LIST_GROUP_ACTION =
Evan Millardc2da5f2009-06-18 16:07:13 -07002104 ContactsContract.Intents.UI.LIST_GROUP_ACTION;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002105
2106 /**
2107 * When in LIST_GROUP_ACTION mode, this is the group to display.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002108 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002109 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002110 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002111 public static final String GROUP_NAME_EXTRA_KEY =
2112 ContactsContract.Intents.UI.GROUP_NAME_EXTRA_KEY;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002113 /**
2114 * The action for the all contacts list tab.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002115 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002116 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002117 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002118 public static final String LIST_ALL_CONTACTS_ACTION =
Evan Millardc2da5f2009-06-18 16:07:13 -07002119 ContactsContract.Intents.UI.LIST_ALL_CONTACTS_ACTION;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002120
2121 /**
2122 * The action for the contacts with phone numbers list tab.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002123 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002124 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002125 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002126 public static final String LIST_CONTACTS_WITH_PHONES_ACTION =
Evan Millardc2da5f2009-06-18 16:07:13 -07002127 ContactsContract.Intents.UI.LIST_CONTACTS_WITH_PHONES_ACTION;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002128
2129 /**
2130 * The action for the starred contacts list tab.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002131 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002132 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002133 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002134 public static final String LIST_STARRED_ACTION =
Evan Millardc2da5f2009-06-18 16:07:13 -07002135 ContactsContract.Intents.UI.LIST_STARRED_ACTION;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002136
2137 /**
2138 * The action for the frequent contacts list tab.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002139 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002140 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002141 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002142 public static final String LIST_FREQUENT_ACTION =
Evan Millardc2da5f2009-06-18 16:07:13 -07002143 ContactsContract.Intents.UI.LIST_FREQUENT_ACTION;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002144
2145 /**
2146 * The action for the "strequent" contacts list tab. It first lists the starred
2147 * contacts in alphabetical order and then the frequent contacts in descending
2148 * order of the number of times they have been contacted.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002149 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002150 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002151 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002152 public static final String LIST_STREQUENT_ACTION =
Evan Millardc2da5f2009-06-18 16:07:13 -07002153 ContactsContract.Intents.UI.LIST_STREQUENT_ACTION;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002154
2155 /**
2156 * A key for to be used as an intent extra to set the activity
2157 * title to a custom String value.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002158 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002159 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002160 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002161 public static final String TITLE_EXTRA_KEY =
Evan Millardc2da5f2009-06-18 16:07:13 -07002162 ContactsContract.Intents.UI.TITLE_EXTRA_KEY;
2163
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002164 /**
2165 * Activity Action: Display a filtered list of contacts
2166 * <p>
2167 * Input: Extra field {@link #FILTER_TEXT_EXTRA_KEY} is the text to use for
2168 * filtering
2169 * <p>
2170 * Output: Nothing.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002171 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002172 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002173 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002174 public static final String FILTER_CONTACTS_ACTION =
2175 ContactsContract.Intents.UI.FILTER_CONTACTS_ACTION;
2176
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002177 /**
2178 * Used as an int extra field in {@link #FILTER_CONTACTS_ACTION}
2179 * intents to supply the text on which to filter.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002180 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002181 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002182 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002183 public static final String FILTER_TEXT_EXTRA_KEY =
2184 ContactsContract.Intents.UI.FILTER_TEXT_EXTRA_KEY;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002185 }
2186
2187 /**
2188 * Convenience class that contains string constants used
2189 * to create contact {@link android.content.Intent Intents}.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002190 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002191 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002192 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002193 public static final class Insert {
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002194 /**
2195 * @deprecated see {@link android.provider.ContactsContract}
2196 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002197 @Deprecated
2198 public Insert() {
2199 }
2200
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002201 /** The action code to use when adding a contact
2202 * @deprecated see {@link android.provider.ContactsContract}
2203 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002204 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002205 public static final String ACTION = ContactsContract.Intents.Insert.ACTION;
Jeff Sharkey534aa012009-08-25 14:33:44 -07002206
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002207 /**
2208 * If present, forces a bypass of quick insert mode.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002209 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002210 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002211 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002212 public static final String FULL_MODE = ContactsContract.Intents.Insert.FULL_MODE;
Jeff Sharkey534aa012009-08-25 14:33:44 -07002213
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002214 /**
2215 * The extra field for the contact name.
2216 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002217 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002218 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002219 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002220 public static final String NAME = ContactsContract.Intents.Insert.NAME;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002221
2222 /**
The Android Open Source Projectb7986892009-01-09 17:51:23 -08002223 * The extra field for the contact phonetic name.
2224 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002225 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectb7986892009-01-09 17:51:23 -08002226 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002227 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002228 public static final String PHONETIC_NAME =
2229 ContactsContract.Intents.Insert.PHONETIC_NAME;
The Android Open Source Projectb7986892009-01-09 17:51:23 -08002230
2231 /**
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002232 * The extra field for the contact company.
2233 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002234 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002235 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002236 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002237 public static final String COMPANY = ContactsContract.Intents.Insert.COMPANY;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002238
2239 /**
2240 * The extra field for the contact job title.
2241 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002242 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002243 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002244 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002245 public static final String JOB_TITLE = ContactsContract.Intents.Insert.JOB_TITLE;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002246
2247 /**
2248 * The extra field for the contact notes.
2249 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002250 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002251 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002252 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002253 public static final String NOTES = ContactsContract.Intents.Insert.NOTES;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002254
2255 /**
2256 * The extra field for the contact phone number.
2257 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002258 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002259 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002260 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002261 public static final String PHONE = ContactsContract.Intents.Insert.PHONE;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002262
2263 /**
2264 * The extra field for the contact phone number type.
2265 * <P>Type: Either an integer value from {@link android.provider.Contacts.PhonesColumns PhonesColumns},
The Android Open Source Projectb7986892009-01-09 17:51:23 -08002266 * or a string specifying a custom label.</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002267 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002268 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002269 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002270 public static final String PHONE_TYPE = ContactsContract.Intents.Insert.PHONE_TYPE;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002271
2272 /**
2273 * The extra field for the phone isprimary flag.
2274 * <P>Type: boolean</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002275 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002276 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002277 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002278 public static final String PHONE_ISPRIMARY =
2279 ContactsContract.Intents.Insert.PHONE_ISPRIMARY;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002280
2281 /**
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002282 * The extra field for an optional second contact phone number.
2283 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002284 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002285 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002286 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002287 public static final String SECONDARY_PHONE =
2288 ContactsContract.Intents.Insert.SECONDARY_PHONE;
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002289
2290 /**
2291 * The extra field for an optional second contact phone number type.
2292 * <P>Type: Either an integer value from {@link android.provider.Contacts.PhonesColumns PhonesColumns},
The Android Open Source Projectb7986892009-01-09 17:51:23 -08002293 * or a string specifying a custom label.</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002294 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002295 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002296 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002297 public static final String SECONDARY_PHONE_TYPE =
2298 ContactsContract.Intents.Insert.SECONDARY_PHONE_TYPE;
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002299
2300 /**
2301 * The extra field for an optional third contact phone number.
2302 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002303 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002304 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002305 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002306 public static final String TERTIARY_PHONE =
2307 ContactsContract.Intents.Insert.TERTIARY_PHONE;
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002308
2309 /**
2310 * The extra field for an optional third contact phone number type.
2311 * <P>Type: Either an integer value from {@link android.provider.Contacts.PhonesColumns PhonesColumns},
The Android Open Source Projectb7986892009-01-09 17:51:23 -08002312 * or a string specifying a custom label.</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002313 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002314 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002315 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002316 public static final String TERTIARY_PHONE_TYPE =
2317 ContactsContract.Intents.Insert.TERTIARY_PHONE_TYPE;
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002318
2319 /**
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002320 * The extra field for the contact email address.
2321 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002322 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002323 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002324 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002325 public static final String EMAIL = ContactsContract.Intents.Insert.EMAIL;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002326
2327 /**
2328 * The extra field for the contact email type.
2329 * <P>Type: Either an integer value from {@link android.provider.Contacts.ContactMethodsColumns ContactMethodsColumns}
The Android Open Source Projectb7986892009-01-09 17:51:23 -08002330 * or a string specifying a custom label.</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002331 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002332 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002333 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002334 public static final String EMAIL_TYPE = ContactsContract.Intents.Insert.EMAIL_TYPE;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002335
2336 /**
2337 * The extra field for the email isprimary flag.
2338 * <P>Type: boolean</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002339 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002340 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002341 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002342 public static final String EMAIL_ISPRIMARY =
2343 ContactsContract.Intents.Insert.EMAIL_ISPRIMARY;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002344
2345 /**
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002346 * The extra field for an optional second contact email address.
2347 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002348 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002349 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002350 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002351 public static final String SECONDARY_EMAIL =
2352 ContactsContract.Intents.Insert.SECONDARY_EMAIL;
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002353
2354 /**
2355 * The extra field for an optional second contact email type.
2356 * <P>Type: Either an integer value from {@link android.provider.Contacts.ContactMethodsColumns ContactMethodsColumns}
The Android Open Source Projectb7986892009-01-09 17:51:23 -08002357 * or a string specifying a custom label.</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002358 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002359 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002360 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002361 public static final String SECONDARY_EMAIL_TYPE =
2362 ContactsContract.Intents.Insert.SECONDARY_EMAIL_TYPE;
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002363
2364 /**
2365 * The extra field for an optional third contact email address.
2366 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002367 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002368 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002369 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002370 public static final String TERTIARY_EMAIL =
2371 ContactsContract.Intents.Insert.TERTIARY_EMAIL;
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002372
2373 /**
2374 * The extra field for an optional third contact email type.
2375 * <P>Type: Either an integer value from {@link android.provider.Contacts.ContactMethodsColumns ContactMethodsColumns}
The Android Open Source Projectb7986892009-01-09 17:51:23 -08002376 * or a string specifying a custom label.</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002377 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002378 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002379 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002380 public static final String TERTIARY_EMAIL_TYPE =
2381 ContactsContract.Intents.Insert.TERTIARY_EMAIL_TYPE;
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002382
2383 /**
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002384 * The extra field for the contact postal address.
2385 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002386 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002387 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002388 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002389 public static final String POSTAL = ContactsContract.Intents.Insert.POSTAL;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002390
2391 /**
2392 * The extra field for the contact postal address type.
2393 * <P>Type: Either an integer value from {@link android.provider.Contacts.ContactMethodsColumns ContactMethodsColumns}
The Android Open Source Projectb7986892009-01-09 17:51:23 -08002394 * or a string specifying a custom label.</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002395 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002396 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002397 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002398 public static final String POSTAL_TYPE = ContactsContract.Intents.Insert.POSTAL_TYPE;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002399
2400 /**
2401 * The extra field for the postal isprimary flag.
2402 * <P>Type: boolean</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002403 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002404 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002405 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002406 public static final String POSTAL_ISPRIMARY = ContactsContract.Intents.Insert.POSTAL_ISPRIMARY;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002407
2408 /**
2409 * The extra field for an IM handle.
2410 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002411 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002412 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002413 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002414 public static final String IM_HANDLE = ContactsContract.Intents.Insert.IM_HANDLE;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002415
2416 /**
2417 * The extra field for the IM protocol
2418 * <P>Type: the result of {@link Contacts.ContactMethods#encodePredefinedImProtocol}
2419 * or {@link Contacts.ContactMethods#encodeCustomImProtocol}.</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002420 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002421 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002422 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002423 public static final String IM_PROTOCOL = ContactsContract.Intents.Insert.IM_PROTOCOL;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002424
2425 /**
2426 * The extra field for the IM isprimary flag.
2427 * <P>Type: boolean</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002428 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002429 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002430 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002431 public static final String IM_ISPRIMARY = ContactsContract.Intents.Insert.IM_ISPRIMARY;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002432 }
2433 }
2434}