blob: c7e3c084da84ebd539e260972f35681a3ae4f94f [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;
Jeff Sharkey534aa012009-08-25 14:33:44 -070029import android.os.Build;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070030import android.text.TextUtils;
31import android.util.Log;
32import android.widget.ImageView;
33
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070034import java.io.ByteArrayInputStream;
35import java.io.InputStream;
36
37/**
38 * The Contacts provider stores all information about contacts.
Jeff Hamiltonf8526982009-09-24 11:34:58 -050039 *
40 * @deprecated The APIs have been superseded by {@link ContactsContract}. The newer APIs allow
41 * access multiple accounts and support aggregation of similar contacts. These APIs continue to
42 * work but will only return data for the first Google account created, which matches the original
43 * behavior.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070044 */
Jeff Sharkey534aa012009-08-25 14:33:44 -070045@Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070046public class Contacts {
47 private static final String TAG = "Contacts";
Evan Millardc2da5f2009-06-18 16:07:13 -070048
Jeff Hamiltonf8526982009-09-24 11:34:58 -050049 /**
50 * @deprecated see {@link android.provider.ContactsContract}
51 */
Jeff Sharkey534aa012009-08-25 14:33:44 -070052 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070053 public static final String AUTHORITY = "contacts";
54
55 /**
56 * The content:// style URL for this provider
Jeff Hamiltonf8526982009-09-24 11:34:58 -050057 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070058 */
Jeff Sharkey534aa012009-08-25 14:33:44 -070059 @Deprecated
Jeff Hamiltonf8526982009-09-24 11:34:58 -050060 public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY);
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070061
Jeff Hamiltonf8526982009-09-24 11:34:58 -050062 /**
63 * Signifies an email address row that is stored in the ContactMethods table
64 * @deprecated see {@link android.provider.ContactsContract}
65 */
Jeff Sharkey534aa012009-08-25 14:33:44 -070066 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070067 public static final int KIND_EMAIL = 1;
Jeff Hamiltonf8526982009-09-24 11:34:58 -050068 /**
69 * Signifies a postal address row that is stored in the ContactMethods table
70 * @deprecated see {@link android.provider.ContactsContract}
71 */
Jeff Sharkey534aa012009-08-25 14:33:44 -070072 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070073 public static final int KIND_POSTAL = 2;
Jeff Hamiltonf8526982009-09-24 11:34:58 -050074 /**
75 * Signifies an IM address row that is stored in the ContactMethods table
76 * @deprecated see {@link android.provider.ContactsContract}
77 */
Jeff Sharkey534aa012009-08-25 14:33:44 -070078 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070079 public static final int KIND_IM = 3;
Jeff Hamiltonf8526982009-09-24 11:34:58 -050080 /**
81 * Signifies an Organization row that is stored in the Organizations table
82 * @deprecated see {@link android.provider.ContactsContract}
83 */
Jeff Sharkey534aa012009-08-25 14:33:44 -070084 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070085 public static final int KIND_ORGANIZATION = 4;
Jeff Hamiltonf8526982009-09-24 11:34:58 -050086 /**
Ken Wakasaf76a50c2012-03-09 19:56:35 +090087 * Signifies a Phone row that is stored in the Phones table
Jeff Hamiltonf8526982009-09-24 11:34:58 -050088 * @deprecated see {@link android.provider.ContactsContract}
89 */
Jeff Sharkey534aa012009-08-25 14:33:44 -070090 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070091 public static final int KIND_PHONE = 5;
92
93 /**
94 * no public constructor since this is a utility class
95 */
96 private Contacts() {}
97
98 /**
99 * Columns from the Settings table that other columns join into themselves.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500100 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700101 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700102 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700103 public interface SettingsColumns {
104 /**
105 * The _SYNC_ACCOUNT to which this setting corresponds. This may be null.
106 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500107 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700108 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700109 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700110 public static final String _SYNC_ACCOUNT = "_sync_account";
111
112 /**
Fred Quintanad9d2f112009-04-23 13:36:27 -0700113 * The _SYNC_ACCOUNT_TYPE to which this setting corresponds. This may be null.
114 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500115 * @deprecated see {@link android.provider.ContactsContract}
Fred Quintanad9d2f112009-04-23 13:36:27 -0700116 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700117 @Deprecated
Fred Quintanad9d2f112009-04-23 13:36:27 -0700118 public static final String _SYNC_ACCOUNT_TYPE = "_sync_account_type";
119
120 /**
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700121 * The key of this setting.
122 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500123 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700124 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700125 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700126 public static final String KEY = "key";
127
128 /**
129 * The value of this setting.
130 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500131 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700132 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700133 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700134 public static final String VALUE = "value";
135 }
136
137 /**
138 * The settings over all of the people
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500139 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700140 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700141 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700142 public static final class Settings implements BaseColumns, SettingsColumns {
143 /**
144 * no public constructor since this is a utility class
145 */
146 private Settings() {}
147
148 /**
149 * The content:// style URL for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500150 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700151 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700152 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700153 public static final Uri CONTENT_URI =
154 Uri.parse("content://contacts/settings");
155
156 /**
157 * The directory twig for this sub-table
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500158 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700159 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700160 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700161 public static final String CONTENT_DIRECTORY = "settings";
162
163 /**
164 * The default sort order for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500165 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700166 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700167 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700168 public static final String DEFAULT_SORT_ORDER = "key ASC";
169
170 /**
171 * A setting that is used to indicate if we should sync down all groups for the
172 * specified account. For this setting the _SYNC_ACCOUNT column must be set.
173 * If this isn't set then we will only sync the groups whose SHOULD_SYNC column
174 * is set to true.
175 * <p>
176 * This is a boolean setting. It is true if it is set and it is anything other than the
177 * emptry string or "0".
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500178 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700179 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700180 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700181 public static final String SYNC_EVERYTHING = "syncEverything";
182
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500183 /**
184 * @deprecated see {@link android.provider.ContactsContract}
185 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700186 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700187 public static String getSetting(ContentResolver cr, String account, String key) {
188 // For now we only support a single account and the UI doesn't know what
189 // the account name is, so we're using a global setting for SYNC_EVERYTHING.
190 // Some day when we add multiple accounts to the UI this should honor the account
191 // that was asked for.
192 String selectString;
193 String[] selectArgs;
194 if (false) {
195 selectString = (account == null)
196 ? "_sync_account is null AND key=?"
197 : "_sync_account=? AND key=?";
Fred Quintanad9d2f112009-04-23 13:36:27 -0700198// : "_sync_account=? AND _sync_account_type=? AND key=?";
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700199 selectArgs = (account == null)
200 ? new String[]{key}
201 : new String[]{account, key};
202 } else {
203 selectString = "key=?";
204 selectArgs = new String[] {key};
205 }
206 Cursor cursor = cr.query(Settings.CONTENT_URI, new String[]{VALUE},
207 selectString, selectArgs, null);
208 try {
209 if (!cursor.moveToNext()) return null;
210 return cursor.getString(0);
211 } finally {
212 cursor.close();
213 }
214 }
215
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500216 /**
217 * @deprecated see {@link android.provider.ContactsContract}
218 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700219 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700220 public static void setSetting(ContentResolver cr, String account, String key,
221 String value) {
222 ContentValues values = new ContentValues();
223 // For now we only support a single account and the UI doesn't know what
224 // the account name is, so we're using a global setting for SYNC_EVERYTHING.
225 // Some day when we add multiple accounts to the UI this should honor the account
226 // that was asked for.
Fred Quintanad9d2f112009-04-23 13:36:27 -0700227 //values.put(_SYNC_ACCOUNT, account.mName);
228 //values.put(_SYNC_ACCOUNT_TYPE, account.mType);
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700229 values.put(KEY, key);
230 values.put(VALUE, value);
231 cr.update(Settings.CONTENT_URI, values, null, null);
232 }
233 }
234
235 /**
236 * Columns from the People table that other tables join into themselves.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500237 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700238 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700239 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700240 public interface PeopleColumns {
241 /**
The Android Open Source Projectb7986892009-01-09 17:51:23 -0800242 * The person's name.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700243 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500244 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700245 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700246 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700247 public static final String NAME = "name";
248
249 /**
The Android Open Source Projectb7986892009-01-09 17:51:23 -0800250 * Phonetic equivalent of the person's name, in a locale-dependent
251 * character set (e.g. hiragana for Japanese).
252 * Used for pronunciation and/or collation in some languages.
253 * <p>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500254 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectb7986892009-01-09 17:51:23 -0800255 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700256 @Deprecated
The Android Open Source Projectb7986892009-01-09 17:51:23 -0800257 public static final String PHONETIC_NAME = "phonetic_name";
Evan Millardc2da5f2009-06-18 16:07:13 -0700258
The Android Open Source Projectb7986892009-01-09 17:51:23 -0800259 /**
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700260 * The display name. If name is not null name, else if number is not null number,
261 * else if email is not null email.
262 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500263 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700264 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700265 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700266 public static final String DISPLAY_NAME = "display_name";
267
268 /**
The Android Open Source Projectba87e3e2009-03-13 13:04:22 -0700269 * The field for sorting list phonetically. The content of this field
270 * may not be human readable but phonetically sortable.
271 * <P>Type: TEXT</p>
272 * @hide Used only in Contacts application for now.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500273 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectba87e3e2009-03-13 13:04:22 -0700274 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700275 @Deprecated
The Android Open Source Projectba87e3e2009-03-13 13:04:22 -0700276 public static final String SORT_STRING = "sort_string";
Evan Millardc2da5f2009-06-18 16:07:13 -0700277
The Android Open Source Projectba87e3e2009-03-13 13:04:22 -0700278 /**
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700279 * Notes about the person.
280 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500281 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700282 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700283 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700284 public static final String NOTES = "notes";
285
286 /**
287 * The number of times a person has been contacted
288 * <P>Type: INTEGER</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500289 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700290 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700291 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700292 public static final String TIMES_CONTACTED = "times_contacted";
293
294 /**
295 * The last time a person was contacted.
296 * <P>Type: INTEGER</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500297 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700298 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700299 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700300 public static final String LAST_TIME_CONTACTED = "last_time_contacted";
301
302 /**
303 * A custom ringtone associated with a person. Not always present.
304 * <P>Type: TEXT (URI to the ringtone)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500305 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700306 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700307 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700308 public static final String CUSTOM_RINGTONE = "custom_ringtone";
309
310 /**
311 * Whether the person should always be sent to voicemail. Not always
312 * present.
313 * <P>Type: INTEGER (0 for false, 1 for true)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500314 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700315 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700316 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700317 public static final String SEND_TO_VOICEMAIL = "send_to_voicemail";
318
319 /**
320 * Is the contact starred?
321 * <P>Type: INTEGER (boolean)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500322 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700323 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700324 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700325 public static final String STARRED = "starred";
326
327 /**
328 * The server version of the photo
329 * <P>Type: TEXT (the version number portion of the photo URI)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500330 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700331 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700332 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -0700333 public static final String PHOTO_VERSION = "photo_version";
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700334 }
335
336 /**
337 * This table contains people.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500338 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700339 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700340 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700341 public static final class People implements BaseColumns, SyncConstValue, PeopleColumns,
342 PhonesColumns, PresenceColumns {
343 /**
344 * no public constructor since this is a utility class
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500345 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700346 */
347 private People() {}
348
349 /**
350 * The content:// style URL for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500351 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700352 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700353 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700354 public static final Uri CONTENT_URI =
355 Uri.parse("content://contacts/people");
356
357 /**
358 * The content:// style URL for filtering people by name. The filter
359 * argument should be passed as an additional path segment after this URI.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500360 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700361 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700362 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700363 public static final Uri CONTENT_FILTER_URI =
364 Uri.parse("content://contacts/people/filter");
365
366 /**
367 * The content:// style URL for the table that holds the deleted
368 * contacts.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500369 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700370 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700371 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700372 public static final Uri DELETED_CONTENT_URI =
373 Uri.parse("content://contacts/deleted_people");
374
375 /**
Jeffrey Sharkey51045182009-03-25 21:37:10 -0700376 * The content:// style URL for filtering people that have a specific
377 * E-mail or IM address. The filter argument should be passed as an
378 * additional path segment after this URI. This matches any people with
379 * at least one E-mail or IM {@link ContactMethods} that match the
380 * filter.
Evan Millardc2da5f2009-06-18 16:07:13 -0700381 *
Dianne Hackborn935ae462009-04-13 16:11:55 -0700382 * Not exposed because we expect significant changes in the contacts
383 * schema and do not want to have to support this.
384 * @hide
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500385 * @deprecated see {@link android.provider.ContactsContract}
Jeffrey Sharkey51045182009-03-25 21:37:10 -0700386 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700387 @Deprecated
Jeffrey Sharkey51045182009-03-25 21:37:10 -0700388 public static final Uri WITH_EMAIL_OR_IM_FILTER_URI =
389 Uri.parse("content://contacts/people/with_email_or_im_filter");
Evan Millardc2da5f2009-06-18 16:07:13 -0700390
Jeffrey Sharkey51045182009-03-25 21:37:10 -0700391 /**
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700392 * The MIME type of {@link #CONTENT_URI} providing a directory of
393 * people.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500394 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700395 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700396 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700397 public static final String CONTENT_TYPE = "vnd.android.cursor.dir/person";
398
399 /**
400 * The MIME type of a {@link #CONTENT_URI} subdirectory of a single
401 * person.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500402 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700403 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700404 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700405 public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/person";
406
407 /**
408 * The default sort order for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500409 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700410 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700411 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700412 public static final String DEFAULT_SORT_ORDER = People.NAME + " ASC";
413
414 /**
415 * The ID of the persons preferred phone number.
416 * <P>Type: INTEGER (foreign key to phones table on the _ID field)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500417 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700418 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700419 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700420 public static final String PRIMARY_PHONE_ID = "primary_phone";
421
422 /**
423 * The ID of the persons preferred email.
424 * <P>Type: INTEGER (foreign key to contact_methods table on the
425 * _ID field)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500426 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700427 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700428 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700429 public static final String PRIMARY_EMAIL_ID = "primary_email";
430
431 /**
432 * The ID of the persons preferred organization.
433 * <P>Type: INTEGER (foreign key to organizations table on the
434 * _ID field)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500435 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700436 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700437 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700438 public static final String PRIMARY_ORGANIZATION_ID = "primary_organization";
439
440 /**
441 * Mark a person as having been contacted.
442 *
443 * @param resolver the ContentResolver to use
444 * @param personId the person who was contacted
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500445 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700446 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700447 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700448 public static void markAsContacted(ContentResolver resolver, long personId) {
449 Uri uri = ContentUris.withAppendedId(CONTENT_URI, personId);
450 uri = Uri.withAppendedPath(uri, "update_contact_time");
451 ContentValues values = new ContentValues();
452 // There is a trigger in place that will update TIMES_CONTACTED when
453 // LAST_TIME_CONTACTED is modified.
454 values.put(LAST_TIME_CONTACTED, System.currentTimeMillis());
455 resolver.update(uri, values, null, null);
456 }
457
458 /**
Daisuke Miyakawa6e9610e2009-05-19 08:51:39 +0900459 * @hide Used in vCard parser code.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500460 * @deprecated see {@link android.provider.ContactsContract}
Daisuke Miyakawa6e9610e2009-05-19 08:51:39 +0900461 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700462 @Deprecated
Daisuke Miyakawa6e9610e2009-05-19 08:51:39 +0900463 public static long tryGetMyContactsGroupId(ContentResolver resolver) {
464 Cursor groupsCursor = resolver.query(Groups.CONTENT_URI, GROUPS_PROJECTION,
465 Groups.SYSTEM_ID + "='" + Groups.GROUP_MY_CONTACTS + "'", null, null);
466 if (groupsCursor != null) {
467 try {
468 if (groupsCursor.moveToFirst()) {
469 return groupsCursor.getLong(0);
470 }
471 } finally {
472 groupsCursor.close();
473 }
474 }
475 return 0;
476 }
477
478 /**
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700479 * Adds a person to the My Contacts group.
Daisuke Miyakawa6e9610e2009-05-19 08:51:39 +0900480 *
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700481 * @param resolver the resolver to use
482 * @param personId the person to add to the group
483 * @return the URI of the group membership row
484 * @throws IllegalStateException if the My Contacts group can't be found
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500485 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700486 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700487 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700488 public static Uri addToMyContactsGroup(ContentResolver resolver, long personId) {
Daisuke Miyakawa6e9610e2009-05-19 08:51:39 +0900489 long groupId = tryGetMyContactsGroupId(resolver);
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700490 if (groupId == 0) {
491 throw new IllegalStateException("Failed to find the My Contacts group");
492 }
Evan Millardc2da5f2009-06-18 16:07:13 -0700493
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700494 return addToGroup(resolver, personId, groupId);
495 }
496
497 /**
498 * Adds a person to a group referred to by name.
Evan Millardc2da5f2009-06-18 16:07:13 -0700499 *
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700500 * @param resolver the resolver to use
501 * @param personId the person to add to the group
502 * @param groupName the name of the group to add the contact to
503 * @return the URI of the group membership row
504 * @throws IllegalStateException if the group can't be found
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500505 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700506 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700507 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700508 public static Uri addToGroup(ContentResolver resolver, long personId, String groupName) {
509 long groupId = 0;
510 Cursor groupsCursor = resolver.query(Groups.CONTENT_URI, GROUPS_PROJECTION,
511 Groups.NAME + "=?", new String[] { groupName }, null);
512 if (groupsCursor != null) {
513 try {
514 if (groupsCursor.moveToFirst()) {
515 groupId = groupsCursor.getLong(0);
516 }
517 } finally {
518 groupsCursor.close();
519 }
520 }
521
522 if (groupId == 0) {
523 throw new IllegalStateException("Failed to find the My Contacts group");
524 }
Evan Millardc2da5f2009-06-18 16:07:13 -0700525
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700526 return addToGroup(resolver, personId, groupId);
527 }
528
529 /**
530 * Adds a person to a group.
Evan Millardc2da5f2009-06-18 16:07:13 -0700531 *
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700532 * @param resolver the resolver to use
533 * @param personId the person to add to the group
534 * @param groupId the group to add the person to
535 * @return the URI of the group membership row
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500536 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700537 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700538 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700539 public static Uri addToGroup(ContentResolver resolver, long personId, long groupId) {
540 ContentValues values = new ContentValues();
541 values.put(GroupMembership.PERSON_ID, personId);
542 values.put(GroupMembership.GROUP_ID, groupId);
543 return resolver.insert(GroupMembership.CONTENT_URI, values);
544 }
Evan Millardc2da5f2009-06-18 16:07:13 -0700545
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700546 private static final String[] GROUPS_PROJECTION = new String[] {
547 Groups._ID,
548 };
549
550 /**
551 * Creates a new contacts and adds it to the "My Contacts" group.
Evan Millardc2da5f2009-06-18 16:07:13 -0700552 *
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700553 * @param resolver the ContentResolver to use
554 * @param values the values to use when creating the contact
555 * @return the URI of the contact, or null if the operation fails
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500556 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700557 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700558 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700559 public static Uri createPersonInMyContactsGroup(ContentResolver resolver,
560 ContentValues values) {
561
562 Uri contactUri = resolver.insert(People.CONTENT_URI, values);
563 if (contactUri == null) {
564 Log.e(TAG, "Failed to create the contact");
565 return null;
566 }
567
568 if (addToMyContactsGroup(resolver, ContentUris.parseId(contactUri)) == null) {
569 resolver.delete(contactUri, null, null);
570 return null;
571 }
572 return contactUri;
573 }
574
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500575 /**
576 * @deprecated see {@link android.provider.ContactsContract}
577 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700578 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700579 public static Cursor queryGroups(ContentResolver resolver, long person) {
580 return resolver.query(GroupMembership.CONTENT_URI, null, "person=?",
581 new String[]{String.valueOf(person)}, Groups.DEFAULT_SORT_ORDER);
582 }
583
584 /**
585 * Set the photo for this person. data may be null
586 * @param cr the ContentResolver to use
587 * @param person the Uri of the person whose photo is to be updated
588 * @param data the byte[] that represents the photo
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500589 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700590 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700591 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700592 public static void setPhotoData(ContentResolver cr, Uri person, byte[] data) {
593 Uri photoUri = Uri.withAppendedPath(person, Contacts.Photos.CONTENT_DIRECTORY);
594 ContentValues values = new ContentValues();
595 values.put(Photos.DATA, data);
596 cr.update(photoUri, values, null, null);
597 }
Evan Millardc2da5f2009-06-18 16:07:13 -0700598
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700599 /**
600 * Opens an InputStream for the person's photo and returns the photo as a Bitmap.
601 * If the person's photo isn't present returns the placeholderImageResource instead.
602 * @param person the person whose photo should be used
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500603 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700604 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700605 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700606 public static InputStream openContactPhotoInputStream(ContentResolver cr, Uri person) {
607 Uri photoUri = Uri.withAppendedPath(person, Contacts.Photos.CONTENT_DIRECTORY);
608 Cursor cursor = cr.query(photoUri, new String[]{Photos.DATA}, null, null, null);
609 try {
Jeff Hamilton8d570b32009-09-17 11:51:32 -0500610 if (cursor == null || !cursor.moveToNext()) {
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700611 return null;
612 }
613 byte[] data = cursor.getBlob(0);
614 if (data == null) {
615 return null;
616 }
617 return new ByteArrayInputStream(data);
618 } finally {
Jeff Sharkey42fc2c62009-09-15 13:50:31 -0700619 if (cursor != null) cursor.close();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700620 }
621 }
622
623 /**
624 * Opens an InputStream for the person's photo and returns the photo as a Bitmap.
625 * If the person's photo isn't present returns the placeholderImageResource instead.
626 * @param context the Context
627 * @param person the person whose photo should be used
628 * @param placeholderImageResource the image resource to use if the person doesn't
629 * have a photo
630 * @param options the decoding options, can be set to null
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500631 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700632 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700633 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700634 public static Bitmap loadContactPhoto(Context context, Uri person,
635 int placeholderImageResource, BitmapFactory.Options options) {
636 if (person == null) {
637 return loadPlaceholderPhoto(placeholderImageResource, context, options);
638 }
639
640 InputStream stream = openContactPhotoInputStream(context.getContentResolver(), person);
641 Bitmap bm = stream != null ? BitmapFactory.decodeStream(stream, null, options) : null;
642 if (bm == null) {
643 bm = loadPlaceholderPhoto(placeholderImageResource, context, options);
644 }
645 return bm;
646 }
647
648 private static Bitmap loadPlaceholderPhoto(int placeholderImageResource, Context context,
649 BitmapFactory.Options options) {
650 if (placeholderImageResource == 0) {
651 return null;
652 }
653 return BitmapFactory.decodeResource(context.getResources(),
654 placeholderImageResource, options);
655 }
656
657 /**
658 * A sub directory of a single person that contains all of their Phones.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500659 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700660 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700661 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700662 public static final class Phones implements BaseColumns, PhonesColumns,
663 PeopleColumns {
664 /**
665 * no public constructor since this is a utility class
666 */
667 private Phones() {}
668
669 /**
670 * The directory twig for this sub-table
Dianne Hackborn29e4a3c2009-09-30 22:35:40 -0700671 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700672 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700673 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700674 public static final String CONTENT_DIRECTORY = "phones";
675
676 /**
677 * The default sort order for this table
Dianne Hackborn29e4a3c2009-09-30 22:35:40 -0700678 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700679 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700680 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700681 public static final String DEFAULT_SORT_ORDER = "number ASC";
682 }
683
684 /**
685 * A subdirectory of a single person that contains all of their
686 * ContactMethods.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500687 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700688 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700689 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700690 public static final class ContactMethods
691 implements BaseColumns, ContactMethodsColumns, PeopleColumns {
692 /**
693 * no public constructor since this is a utility class
694 */
695 private ContactMethods() {}
696
697 /**
698 * The directory twig for this sub-table
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500699 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700700 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700701 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700702 public static final String CONTENT_DIRECTORY = "contact_methods";
703
704 /**
705 * The default sort order for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500706 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700707 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700708 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700709 public static final String DEFAULT_SORT_ORDER = "data ASC";
710 }
711
712 /**
713 * The extensions for a person
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500714 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700715 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700716 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700717 public static class Extensions implements BaseColumns, ExtensionsColumns {
718 /**
719 * no public constructor since this is a utility class
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500720 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700721 */
722 private Extensions() {}
723
724 /**
725 * The directory twig for this sub-table
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500726 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700727 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700728 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700729 public static final String CONTENT_DIRECTORY = "extensions";
730
731 /**
732 * The default sort order for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500733 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700734 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700735 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700736 public static final String DEFAULT_SORT_ORDER = "name ASC";
737
738 /**
739 * The ID of the person this phone number is assigned to.
740 * <P>Type: INTEGER (long)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500741 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700742 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700743 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700744 public static final String PERSON_ID = "person";
745 }
746 }
747
748 /**
749 * Columns from the groups table.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500750 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700751 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700752 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700753 public interface GroupsColumns {
754 /**
755 * The group name.
756 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500757 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700758 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700759 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700760 public static final String NAME = "name";
761
762 /**
763 * Notes about the group.
764 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500765 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700766 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700767 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700768 public static final String NOTES = "notes";
769
770 /**
771 * Whether this group should be synced if the SYNC_EVERYTHING settings is false
772 * for this group's account.
773 * <P>Type: INTEGER (boolean)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500774 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700775 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700776 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700777 public static final String SHOULD_SYNC = "should_sync";
778
779 /**
780 * The ID of this group if it is a System Group, null otherwise.
781 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500782 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700783 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700784 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700785 public static final String SYSTEM_ID = "system_id";
786 }
787
788 /**
789 * This table contains the groups for an account.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500790 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700791 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700792 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700793 public static final class Groups
794 implements BaseColumns, SyncConstValue, GroupsColumns {
795 /**
796 * no public constructor since this is a utility class
797 */
798 private Groups() {}
799
800 /**
801 * The content:// style URL for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500802 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700803 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700804 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700805 public static final Uri CONTENT_URI =
806 Uri.parse("content://contacts/groups");
807
808 /**
809 * The content:// style URL for the table that holds the deleted
810 * groups.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500811 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700812 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700813 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700814 public static final Uri DELETED_CONTENT_URI =
815 Uri.parse("content://contacts/deleted_groups");
816
817 /**
818 * The MIME type of {@link #CONTENT_URI} providing a directory of
819 * groups.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500820 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700821 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700822 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700823 public static final String CONTENT_TYPE = "vnd.android.cursor.dir/contactsgroup";
824
825 /**
826 * The MIME type of a {@link #CONTENT_URI} subdirectory of a single
827 * group.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500828 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700829 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700830 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700831 public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/contactsgroup";
832
833 /**
834 * The default sort order for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500835 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700836 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700837 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700838 public static final String DEFAULT_SORT_ORDER = NAME + " ASC";
839
840 /**
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500841 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700842 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700843 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700844 public static final String GROUP_ANDROID_STARRED = "Starred in Android";
845
846 /**
847 * The "My Contacts" system group.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500848 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700849 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700850 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700851 public static final String GROUP_MY_CONTACTS = "Contacts";
852 }
853
854 /**
855 * Columns from the Phones table that other columns join into themselves.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500856 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700857 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700858 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700859 public interface PhonesColumns {
860 /**
861 * The type of the the phone number.
862 * <P>Type: INTEGER (one of the constants below)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500863 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700864 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700865 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700866 public static final String TYPE = "type";
867
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500868 /**
869 * @deprecated see {@link android.provider.ContactsContract}
870 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700871 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700872 public static final int TYPE_CUSTOM = 0;
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500873 /**
874 * @deprecated see {@link android.provider.ContactsContract}
875 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700876 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700877 public static final int TYPE_HOME = 1;
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500878 /**
879 * @deprecated see {@link android.provider.ContactsContract}
880 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700881 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700882 public static final int TYPE_MOBILE = 2;
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500883 /**
884 * @deprecated see {@link android.provider.ContactsContract}
885 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700886 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700887 public static final int TYPE_WORK = 3;
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500888 /**
889 * @deprecated see {@link android.provider.ContactsContract}
890 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700891 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700892 public static final int TYPE_FAX_WORK = 4;
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500893 /**
894 * @deprecated see {@link android.provider.ContactsContract}
895 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700896 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700897 public static final int TYPE_FAX_HOME = 5;
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500898 /**
899 * @deprecated see {@link android.provider.ContactsContract}
900 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700901 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700902 public static final int TYPE_PAGER = 6;
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500903 /**
904 * @deprecated see {@link android.provider.ContactsContract}
905 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700906 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700907 public static final int TYPE_OTHER = 7;
908
909 /**
910 * The user provided label for the phone number, only used if TYPE is TYPE_CUSTOM.
911 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500912 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700913 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700914 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700915 public static final String LABEL = "label";
916
917 /**
918 * The phone number as the user entered it.
919 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500920 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700921 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700922 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700923 public static final String NUMBER = "number";
924
925 /**
926 * The normalized phone number
927 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500928 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700929 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700930 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700931 public static final String NUMBER_KEY = "number_key";
932
933 /**
934 * Whether this is the primary phone number
935 * <P>Type: INTEGER (if set, non-0 means true)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500936 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700937 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700938 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700939 public static final String ISPRIMARY = "isprimary";
940 }
941
942 /**
943 * This table stores phone numbers and a reference to the person that the
944 * contact method belongs to. Phone numbers are stored separately from
945 * other contact methods to make caller ID lookup more efficient.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500946 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700947 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700948 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700949 public static final class Phones
950 implements BaseColumns, PhonesColumns, PeopleColumns {
951 /**
952 * no public constructor since this is a utility class
953 */
954 private Phones() {}
955
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500956 /**
957 * @deprecated see {@link android.provider.ContactsContract}
958 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700959 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700960 public static final CharSequence getDisplayLabel(Context context, int type,
961 CharSequence label, CharSequence[] labelArray) {
962 CharSequence display = "";
963
964 if (type != People.Phones.TYPE_CUSTOM) {
Evan Millardc2da5f2009-06-18 16:07:13 -0700965 CharSequence[] labels = labelArray != null? labelArray
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700966 : context.getResources().getTextArray(
967 com.android.internal.R.array.phoneTypes);
968 try {
969 display = labels[type - 1];
970 } catch (ArrayIndexOutOfBoundsException e) {
971 display = labels[People.Phones.TYPE_HOME - 1];
972 }
973 } else {
974 if (!TextUtils.isEmpty(label)) {
975 display = label;
976 }
977 }
978 return display;
979 }
980
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500981 /**
982 * @deprecated see {@link android.provider.ContactsContract}
983 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700984 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700985 public static final CharSequence getDisplayLabel(Context context, int type,
986 CharSequence label) {
987 return getDisplayLabel(context, type, label, null);
988 }
Evan Millardc2da5f2009-06-18 16:07:13 -0700989
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700990 /**
991 * The content:// style URL for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500992 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700993 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700994 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700995 public static final Uri CONTENT_URI =
996 Uri.parse("content://contacts/phones");
997
998 /**
999 * The content:// style URL for filtering phone numbers
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001000 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001001 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001002 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001003 public static final Uri CONTENT_FILTER_URL =
1004 Uri.parse("content://contacts/phones/filter");
1005
1006 /**
1007 * The MIME type of {@link #CONTENT_URI} providing a directory of
1008 * phones.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001009 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001010 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001011 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001012 public static final String CONTENT_TYPE = "vnd.android.cursor.dir/phone";
1013
1014 /**
1015 * The MIME type of a {@link #CONTENT_URI} subdirectory of a single
1016 * phone.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001017 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001018 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001019 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001020 public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/phone";
1021
1022 /**
1023 * The default sort order for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001024 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001025 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001026 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001027 public static final String DEFAULT_SORT_ORDER = "name ASC";
1028
1029 /**
1030 * The ID of the person this phone number is assigned to.
1031 * <P>Type: INTEGER (long)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001032 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001033 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001034 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001035 public static final String PERSON_ID = "person";
1036 }
1037
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001038 /**
1039 * @deprecated see {@link android.provider.ContactsContract}
1040 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001041 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001042 public static final class GroupMembership implements BaseColumns, GroupsColumns {
1043 /**
1044 * no public constructor since this is a utility class
1045 */
1046 private GroupMembership() {}
1047
1048 /**
1049 * The content:// style URL for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001050 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001051 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001052 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001053 public static final Uri CONTENT_URI =
1054 Uri.parse("content://contacts/groupmembership");
1055
1056 /**
1057 * The content:// style URL for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001058 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001059 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001060 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001061 public static final Uri RAW_CONTENT_URI =
1062 Uri.parse("content://contacts/groupmembershipraw");
1063
1064 /**
1065 * The directory twig for this sub-table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001066 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001067 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001068 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001069 public static final String CONTENT_DIRECTORY = "groupmembership";
Jeff Sharkey534aa012009-08-25 14:33:44 -07001070
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001071 /**
1072 * The MIME type of {@link #CONTENT_URI} providing a directory of all
1073 * person groups.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001074 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001075 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001076 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001077 public static final String CONTENT_TYPE = "vnd.android.cursor.dir/contactsgroupmembership";
1078
1079 /**
1080 * The MIME type of a {@link #CONTENT_URI} subdirectory of a single
1081 * person group.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001082 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001083 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001084 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001085 public static final String CONTENT_ITEM_TYPE =
1086 "vnd.android.cursor.item/contactsgroupmembership";
1087
1088 /**
1089 * The default sort order for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001090 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001091 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001092 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001093 public static final String DEFAULT_SORT_ORDER = "group_id ASC";
1094
1095 /**
1096 * The row id of the accounts group.
1097 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001098 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001099 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001100 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001101 public static final String GROUP_ID = "group_id";
1102
1103 /**
1104 * The sync id of the group.
1105 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001106 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001107 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001108 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001109 public static final String GROUP_SYNC_ID = "group_sync_id";
1110
1111 /**
1112 * The account of the group.
1113 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001114 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001115 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001116 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001117 public static final String GROUP_SYNC_ACCOUNT = "group_sync_account";
1118
1119 /**
Fred Quintanad9d2f112009-04-23 13:36:27 -07001120 * The account type of the group.
1121 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001122 * @deprecated see {@link android.provider.ContactsContract}
Fred Quintanad9d2f112009-04-23 13:36:27 -07001123 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001124 @Deprecated
Fred Quintanad9d2f112009-04-23 13:36:27 -07001125 public static final String GROUP_SYNC_ACCOUNT_TYPE = "group_sync_account_type";
1126
1127 /**
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001128 * The row id of the person.
1129 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001130 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001131 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001132 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001133 public static final String PERSON_ID = "person";
1134 }
1135
1136 /**
1137 * Columns from the ContactMethods table that other tables join into
1138 * themseleves.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001139 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001140 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001141 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001142 public interface ContactMethodsColumns {
1143 /**
1144 * The kind of the the contact method. For example, email address,
1145 * postal address, etc.
1146 * <P>Type: INTEGER (one of the values below)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001147 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001148 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001149 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001150 public static final String KIND = "kind";
1151
1152 /**
1153 * The type of the contact method, must be one of the types below.
1154 * <P>Type: INTEGER (one of the values below)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001155 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001156 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001157 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001158 public static final String TYPE = "type";
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001159 /**
1160 * @deprecated see {@link android.provider.ContactsContract}
1161 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001162 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001163 public static final int TYPE_CUSTOM = 0;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001164 /**
1165 * @deprecated see {@link android.provider.ContactsContract}
1166 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001167 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001168 public static final int TYPE_HOME = 1;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001169 /**
1170 * @deprecated see {@link android.provider.ContactsContract}
1171 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001172 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001173 public static final int TYPE_WORK = 2;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001174 /**
1175 * @deprecated see {@link android.provider.ContactsContract}
1176 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001177 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001178 public static final int TYPE_OTHER = 3;
1179
1180 /**
Daisuke Miyakawa7c3e18c52009-05-19 23:13:14 +09001181 * @hide This is temporal. TYPE_MOBILE should be added to TYPE in the future.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001182 * @deprecated see {@link android.provider.ContactsContract}
Daisuke Miyakawa7c3e18c52009-05-19 23:13:14 +09001183 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001184 @Deprecated
Daisuke Miyakawa7c3e18c52009-05-19 23:13:14 +09001185 public static final int MOBILE_EMAIL_TYPE_INDEX = 2;
1186
1187 /**
1188 * @hide This is temporal. TYPE_MOBILE should be added to TYPE in the future.
1189 * This is not "mobile" but "CELL" since vCard uses it for identifying mobile phone.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001190 * @deprecated see {@link android.provider.ContactsContract}
Daisuke Miyakawa7c3e18c52009-05-19 23:13:14 +09001191 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001192 @Deprecated
Daisuke Miyakawa7c3e18c52009-05-19 23:13:14 +09001193 public static final String MOBILE_EMAIL_TYPE_NAME = "_AUTO_CELL";
1194
1195 /**
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001196 * The user defined label for the the contact method.
1197 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001198 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001199 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001200 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001201 public static final String LABEL = "label";
1202
1203 /**
1204 * The data for the contact method.
1205 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001206 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001207 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001208 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001209 public static final String DATA = "data";
1210
1211 /**
1212 * Auxiliary data for the contact method.
1213 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001214 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001215 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001216 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001217 public static final String AUX_DATA = "aux_data";
1218
1219 /**
1220 * Whether this is the primary organization
1221 * <P>Type: INTEGER (if set, non-0 means true)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001222 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001223 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001224 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001225 public static final String ISPRIMARY = "isprimary";
1226 }
1227
1228 /**
1229 * This table stores all non-phone contact methods and a reference to the
1230 * person that the contact method belongs to.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001231 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001232 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001233 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001234 public static final class ContactMethods
1235 implements BaseColumns, ContactMethodsColumns, PeopleColumns {
1236 /**
1237 * The column with latitude data for postal locations
1238 * <P>Type: REAL</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001239 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001240 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001241 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001242 public static final String POSTAL_LOCATION_LATITUDE = DATA;
1243
1244 /**
1245 * The column with longitude data for postal locations
1246 * <P>Type: REAL</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001247 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001248 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001249 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001250 public static final String POSTAL_LOCATION_LONGITUDE = AUX_DATA;
1251
1252 /**
1253 * The predefined IM protocol types. The protocol can either be non-present, one
1254 * of these types, or a free-form string. These cases are encoded in the AUX_DATA
1255 * column as:
1256 * - null
1257 * - pre:<an integer, one of the protocols below>
1258 * - custom:<a string>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001259 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001260 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001261 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001262 public static final int PROTOCOL_AIM = 0;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001263 /**
1264 * @deprecated see {@link android.provider.ContactsContract}
1265 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001266 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001267 public static final int PROTOCOL_MSN = 1;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001268 /**
1269 * @deprecated see {@link android.provider.ContactsContract}
1270 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001271 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001272 public static final int PROTOCOL_YAHOO = 2;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001273 /**
1274 * @deprecated see {@link android.provider.ContactsContract}
1275 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001276 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001277 public static final int PROTOCOL_SKYPE = 3;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001278 /**
1279 * @deprecated see {@link android.provider.ContactsContract}
1280 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001281 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001282 public static final int PROTOCOL_QQ = 4;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001283 /**
1284 * @deprecated see {@link android.provider.ContactsContract}
1285 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001286 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001287 public static final int PROTOCOL_GOOGLE_TALK = 5;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001288 /**
1289 * @deprecated see {@link android.provider.ContactsContract}
1290 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001291 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001292 public static final int PROTOCOL_ICQ = 6;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001293 /**
1294 * @deprecated see {@link android.provider.ContactsContract}
1295 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001296 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001297 public static final int PROTOCOL_JABBER = 7;
1298
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001299 /**
1300 * @deprecated see {@link android.provider.ContactsContract}
1301 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001302 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001303 public static String encodePredefinedImProtocol(int protocol) {
1304 return "pre:" + protocol;
1305 }
1306
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001307 /**
1308 * @deprecated see {@link android.provider.ContactsContract}
1309 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001310 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001311 public static String encodeCustomImProtocol(String protocolString) {
1312 return "custom:" + protocolString;
1313 }
1314
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001315 /**
1316 * @deprecated see {@link android.provider.ContactsContract}
1317 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001318 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001319 public static Object decodeImProtocol(String encodedString) {
1320 if (encodedString == null) {
1321 return null;
1322 }
1323
1324 if (encodedString.startsWith("pre:")) {
1325 return Integer.parseInt(encodedString.substring(4));
1326 }
1327
1328 if (encodedString.startsWith("custom:")) {
1329 return encodedString.substring(7);
1330 }
1331
1332 throw new IllegalArgumentException(
1333 "the value is not a valid encoded protocol, " + encodedString);
1334 }
Evan Millardc2da5f2009-06-18 16:07:13 -07001335
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001336 /**
Jeff Hamiltonf3960b12009-11-20 20:04:03 -08001337 * TODO find a place to put the canonical version of these.
1338 */
1339 interface ProviderNames {
1340 //
1341 //NOTE: update Contacts.java with new providers when they're added.
1342 //
1343 String YAHOO = "Yahoo";
1344 String GTALK = "GTalk";
1345 String MSN = "MSN";
1346 String ICQ = "ICQ";
1347 String AIM = "AIM";
1348 String XMPP = "XMPP";
1349 String JABBER = "JABBER";
1350 String SKYPE = "SKYPE";
1351 String QQ = "QQ";
1352 }
1353
1354 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001355 * This looks up the provider name defined in
Jeff Hamiltonf3960b12009-11-20 20:04:03 -08001356 * from the predefined IM protocol id.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001357 * This is used for interacting with the IM application.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001358 *
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001359 * @param protocol the protocol ID
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001360 * @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 -07001361 * provider is defined for the given protocol
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001362 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001363 * @hide
1364 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001365 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001366 public static String lookupProviderNameFromId(int protocol) {
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001367 switch (protocol) {
1368 case PROTOCOL_GOOGLE_TALK:
Jeff Hamiltonf3960b12009-11-20 20:04:03 -08001369 return ProviderNames.GTALK;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001370 case PROTOCOL_AIM:
Jeff Hamiltonf3960b12009-11-20 20:04:03 -08001371 return ProviderNames.AIM;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001372 case PROTOCOL_MSN:
Jeff Hamiltonf3960b12009-11-20 20:04:03 -08001373 return ProviderNames.MSN;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001374 case PROTOCOL_YAHOO:
Jeff Hamiltonf3960b12009-11-20 20:04:03 -08001375 return ProviderNames.YAHOO;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001376 case PROTOCOL_ICQ:
Jeff Hamiltonf3960b12009-11-20 20:04:03 -08001377 return ProviderNames.ICQ;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001378 case PROTOCOL_JABBER:
Jeff Hamiltonf3960b12009-11-20 20:04:03 -08001379 return ProviderNames.JABBER;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001380 case PROTOCOL_SKYPE:
Jeff Hamiltonf3960b12009-11-20 20:04:03 -08001381 return ProviderNames.SKYPE;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001382 case PROTOCOL_QQ:
Jeff Hamiltonf3960b12009-11-20 20:04:03 -08001383 return ProviderNames.QQ;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001384 }
1385 return null;
1386 }
1387
1388 /**
1389 * no public constructor since this is a utility class
1390 */
1391 private ContactMethods() {}
1392
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001393 /**
1394 * @deprecated see {@link android.provider.ContactsContract}
1395 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001396 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001397 public static final CharSequence getDisplayLabel(Context context, int kind,
1398 int type, CharSequence label) {
1399 CharSequence display = "";
1400 switch (kind) {
1401 case KIND_EMAIL: {
1402 if (type != People.ContactMethods.TYPE_CUSTOM) {
1403 CharSequence[] labels = context.getResources().getTextArray(
1404 com.android.internal.R.array.emailAddressTypes);
1405 try {
1406 display = labels[type - 1];
1407 } catch (ArrayIndexOutOfBoundsException e) {
1408 display = labels[ContactMethods.TYPE_HOME - 1];
1409 }
1410 } else {
1411 if (!TextUtils.isEmpty(label)) {
1412 display = label;
1413 }
1414 }
1415 break;
1416 }
1417
1418 case KIND_POSTAL: {
1419 if (type != People.ContactMethods.TYPE_CUSTOM) {
1420 CharSequence[] labels = context.getResources().getTextArray(
1421 com.android.internal.R.array.postalAddressTypes);
1422 try {
1423 display = labels[type - 1];
1424 } catch (ArrayIndexOutOfBoundsException e) {
1425 display = labels[ContactMethods.TYPE_HOME - 1];
1426 }
1427 } else {
1428 if (!TextUtils.isEmpty(label)) {
1429 display = label;
1430 }
1431 }
1432 break;
1433 }
1434
1435 default:
1436 display = context.getString(R.string.untitled);
1437 }
1438 return display;
1439 }
1440
1441 /**
1442 * Add a longitude and latitude location to a postal address.
1443 *
1444 * @param context the context to use when updating the database
1445 * @param postalId the address to update
1446 * @param latitude the latitude for the address
1447 * @param longitude the longitude for the address
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001448 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001449 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001450 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001451 public void addPostalLocation(Context context, long postalId,
1452 double latitude, double longitude) {
1453 final ContentResolver resolver = context.getContentResolver();
1454 // Insert the location
1455 ContentValues values = new ContentValues(2);
1456 values.put(POSTAL_LOCATION_LATITUDE, latitude);
1457 values.put(POSTAL_LOCATION_LONGITUDE, longitude);
1458 Uri loc = resolver.insert(CONTENT_URI, values);
1459 long locId = ContentUris.parseId(loc);
1460
1461 // Update the postal address
1462 values.clear();
1463 values.put(AUX_DATA, locId);
1464 resolver.update(ContentUris.withAppendedId(CONTENT_URI, postalId), values, null, null);
1465 }
1466
1467 /**
1468 * The content:// style URL for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001469 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001470 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001471 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001472 public static final Uri CONTENT_URI =
1473 Uri.parse("content://contacts/contact_methods");
1474
1475 /**
1476 * The content:// style URL for sub-directory of e-mail addresses.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001477 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001478 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001479 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001480 public static final Uri CONTENT_EMAIL_URI =
1481 Uri.parse("content://contacts/contact_methods/email");
1482
1483 /**
1484 * The MIME type of {@link #CONTENT_URI} providing a directory of
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001485 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001486 * phones.
1487 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001488 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001489 public static final String CONTENT_TYPE = "vnd.android.cursor.dir/contact-methods";
1490
1491 /**
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001492 * The MIME type of a {@link #CONTENT_EMAIL_URI} sub-directory of
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001493 * multiple {@link Contacts#KIND_EMAIL} entries.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001494 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001495 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001496 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001497 public static final String CONTENT_EMAIL_TYPE = "vnd.android.cursor.dir/email";
1498
1499 /**
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001500 * The MIME type of a {@link #CONTENT_EMAIL_URI} sub-directory of
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001501 * multiple {@link Contacts#KIND_POSTAL} entries.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001502 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001503 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001504 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001505 public static final String CONTENT_POSTAL_TYPE = "vnd.android.cursor.dir/postal-address";
1506
1507 /**
1508 * The MIME type of a {@link #CONTENT_URI} sub-directory of a single
1509 * {@link Contacts#KIND_EMAIL} entry.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001510 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001511 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001512 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001513 public static final String CONTENT_EMAIL_ITEM_TYPE = "vnd.android.cursor.item/email";
1514
1515 /**
1516 * The MIME type of a {@link #CONTENT_URI} sub-directory of a single
1517 * {@link Contacts#KIND_POSTAL} entry.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001518 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001519 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001520 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001521 public static final String CONTENT_POSTAL_ITEM_TYPE
1522 = "vnd.android.cursor.item/postal-address";
1523
1524 /**
1525 * The MIME type of a {@link #CONTENT_URI} sub-directory of a single
1526 * {@link Contacts#KIND_IM} entry.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001527 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001528 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001529 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001530 public static final String CONTENT_IM_ITEM_TYPE = "vnd.android.cursor.item/jabber-im";
1531
1532 /**
1533 * The default sort order for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001534 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001535 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001536 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001537 public static final String DEFAULT_SORT_ORDER = "name ASC";
1538
1539 /**
1540 * The ID of the person this contact method is assigned to.
1541 * <P>Type: INTEGER (long)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001542 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001543 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001544 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001545 public static final String PERSON_ID = "person";
1546 }
1547
1548 /**
1549 * The IM presence columns with some contacts specific columns mixed in.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001550 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001551 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001552 @Deprecated
Jeff Hamiltonf3960b12009-11-20 20:04:03 -08001553 public interface PresenceColumns {
1554 /**
1555 * The priority, an integer, used by XMPP presence
1556 * <P>Type: INTEGER</P>
1557 */
1558 String PRIORITY = "priority";
1559
1560 /**
1561 * The server defined status.
1562 * <P>Type: INTEGER (one of the values below)</P>
1563 */
1564 String PRESENCE_STATUS = ContactsContract.StatusUpdates.PRESENCE;
1565
1566 /**
1567 * Presence Status definition
1568 */
1569 int OFFLINE = ContactsContract.StatusUpdates.OFFLINE;
1570 int INVISIBLE = ContactsContract.StatusUpdates.INVISIBLE;
1571 int AWAY = ContactsContract.StatusUpdates.AWAY;
1572 int IDLE = ContactsContract.StatusUpdates.IDLE;
1573 int DO_NOT_DISTURB = ContactsContract.StatusUpdates.DO_NOT_DISTURB;
1574 int AVAILABLE = ContactsContract.StatusUpdates.AVAILABLE;
1575
1576 /**
1577 * The user defined status line.
1578 * <P>Type: TEXT</P>
1579 */
1580 String PRESENCE_CUSTOM_STATUS = ContactsContract.StatusUpdates.STATUS;
1581
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001582 /**
1583 * The IM service the presence is coming from. Formatted using either
1584 * {@link Contacts.ContactMethods#encodePredefinedImProtocol} or
1585 * {@link Contacts.ContactMethods#encodeCustomImProtocol}.
1586 * <P>Type: STRING</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001587 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001588 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001589 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001590 public static final String IM_PROTOCOL = "im_protocol";
1591
1592 /**
1593 * The IM handle the presence item is for. The handle is scoped to
1594 * the {@link #IM_PROTOCOL}.
1595 * <P>Type: STRING</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001596 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001597 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001598 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001599 public static final String IM_HANDLE = "im_handle";
1600
1601 /**
1602 * The IM account for the local user that the presence data came from.
1603 * <P>Type: STRING</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001604 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001605 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001606 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001607 public static final String IM_ACCOUNT = "im_account";
1608 }
1609
1610 /**
1611 * Contains presence information about contacts.
1612 * @hide
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001613 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001614 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001615 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001616 public static final class Presence
1617 implements BaseColumns, PresenceColumns, PeopleColumns {
1618 /**
1619 * The content:// style URL for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001620 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001621 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001622 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001623 public static final Uri CONTENT_URI =
1624 Uri.parse("content://contacts/presence");
1625
1626 /**
1627 * The ID of the person this presence item is assigned to.
1628 * <P>Type: INTEGER (long)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001629 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001630 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001631 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001632 public static final String PERSON_ID = "person";
1633
1634 /**
1635 * Gets the resource ID for the proper presence icon.
Evan Millardc2da5f2009-06-18 16:07:13 -07001636 *
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001637 * @param status the status to get the icon for
1638 * @return the resource ID for the proper presence icon
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001639 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001640 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001641 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001642 public static final int getPresenceIconResourceId(int status) {
1643 switch (status) {
1644 case Contacts.People.AVAILABLE:
1645 return com.android.internal.R.drawable.presence_online;
Evan Millardc2da5f2009-06-18 16:07:13 -07001646
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001647 case Contacts.People.IDLE:
1648 case Contacts.People.AWAY:
1649 return com.android.internal.R.drawable.presence_away;
Evan Millardc2da5f2009-06-18 16:07:13 -07001650
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001651 case Contacts.People.DO_NOT_DISTURB:
1652 return com.android.internal.R.drawable.presence_busy;
Evan Millardc2da5f2009-06-18 16:07:13 -07001653
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001654 case Contacts.People.INVISIBLE:
1655 return com.android.internal.R.drawable.presence_invisible;
Evan Millardc2da5f2009-06-18 16:07:13 -07001656
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001657 case Contacts.People.OFFLINE:
1658 default:
1659 return com.android.internal.R.drawable.presence_offline;
1660 }
1661 }
1662
1663 /**
1664 * Sets a presence icon to the proper graphic
1665 *
1666 * @param icon the icon to to set
1667 * @param serverStatus that status
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001668 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001669 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001670 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001671 public static final void setPresenceIcon(ImageView icon, int serverStatus) {
1672 icon.setImageResource(getPresenceIconResourceId(serverStatus));
1673 }
1674 }
1675
1676 /**
1677 * Columns from the Organizations table that other columns join into themselves.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001678 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001679 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001680 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001681 public interface OrganizationColumns {
1682 /**
Evan JIANGae499952008-11-02 09:47:52 +08001683 * The type of the organizations.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001684 * <P>Type: INTEGER (one of the constants below)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001685 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001686 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001687 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001688 public static final String TYPE = "type";
1689
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001690 /**
1691 * @deprecated see {@link android.provider.ContactsContract}
1692 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001693 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001694 public static final int TYPE_CUSTOM = 0;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001695 /**
1696 * @deprecated see {@link android.provider.ContactsContract}
1697 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001698 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001699 public static final int TYPE_WORK = 1;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001700 /**
1701 * @deprecated see {@link android.provider.ContactsContract}
1702 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001703 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001704 public static final int TYPE_OTHER = 2;
1705
1706 /**
1707 * The user provided label, only used if TYPE is TYPE_CUSTOM.
1708 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001709 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001710 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001711 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001712 public static final String LABEL = "label";
1713
1714 /**
1715 * The name of the company for this organization.
1716 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001717 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001718 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001719 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001720 public static final String COMPANY = "company";
1721
1722 /**
1723 * The title within this organization.
1724 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001725 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001726 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001727 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001728 public static final String TITLE = "title";
1729
1730 /**
1731 * The person this organization is tied to.
1732 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001733 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001734 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001735 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001736 public static final String PERSON_ID = "person";
1737
1738 /**
1739 * Whether this is the primary organization
1740 * <P>Type: INTEGER (if set, non-0 means true)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001741 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001742 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001743 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001744 public static final String ISPRIMARY = "isprimary";
1745 }
1746
1747 /**
1748 * A sub directory of a single person that contains all of their Phones.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001749 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001750 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001751 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001752 public static final class Organizations implements BaseColumns, OrganizationColumns {
1753 /**
1754 * no public constructor since this is a utility class
1755 */
1756 private Organizations() {}
1757
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001758 /**
1759 * @deprecated see {@link android.provider.ContactsContract}
1760 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001761 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001762 public static final CharSequence getDisplayLabel(Context context, int type,
1763 CharSequence label) {
1764 CharSequence display = "";
1765
1766 if (type != TYPE_CUSTOM) {
1767 CharSequence[] labels = context.getResources().getTextArray(
1768 com.android.internal.R.array.organizationTypes);
1769 try {
1770 display = labels[type - 1];
1771 } catch (ArrayIndexOutOfBoundsException e) {
Evan JIANGae499952008-11-02 09:47:52 +08001772 display = labels[Organizations.TYPE_WORK - 1];
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001773 }
1774 } else {
1775 if (!TextUtils.isEmpty(label)) {
1776 display = label;
1777 }
1778 }
1779 return display;
1780 }
1781
1782 /**
1783 * The content:// style URL for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001784 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001785 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001786 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001787 public static final Uri CONTENT_URI =
1788 Uri.parse("content://contacts/organizations");
1789
1790 /**
1791 * The directory twig for this sub-table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001792 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001793 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001794 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001795 public static final String CONTENT_DIRECTORY = "organizations";
1796
1797 /**
1798 * The default sort order for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001799 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001800 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001801 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001802 public static final String DEFAULT_SORT_ORDER = "company, title, isprimary ASC";
1803 }
1804
1805 /**
1806 * Columns from the Photos table that other columns join into themselves.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001807 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001808 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001809 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001810 public interface PhotosColumns {
1811 /**
1812 * The _SYNC_VERSION of the photo that was last downloaded
1813 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001814 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001815 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001816 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001817 public static final String LOCAL_VERSION = "local_version";
1818
1819 /**
1820 * The person this photo is associated with.
1821 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001822 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001823 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001824 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001825 public static final String PERSON_ID = "person";
1826
1827 /**
1828 * non-zero if a download is required and the photo isn't marked as a bad resource.
1829 * You must specify this in the columns in order to use it in the where clause.
1830 * <P>Type: INTEGER(boolean)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001831 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001832 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001833 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001834 public static final String DOWNLOAD_REQUIRED = "download_required";
1835
1836 /**
1837 * non-zero if this photo is known to exist on the server
1838 * <P>Type: INTEGER(boolean)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001839 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001840 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001841 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001842 public static final String EXISTS_ON_SERVER = "exists_on_server";
1843
1844 /**
1845 * Contains the description of the upload or download error from
1846 * the previous attempt. If null then the previous attempt succeeded.
1847 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001848 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001849 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001850 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001851 public static final String SYNC_ERROR = "sync_error";
1852
1853 /**
1854 * The image data, or null if there is no image.
1855 * <P>Type: BLOB</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001856 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001857 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001858 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001859 public static final String DATA = "data";
1860
1861 }
1862
1863 /**
1864 * The photos over all of the people
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001865 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001866 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001867 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001868 public static final class Photos implements BaseColumns, PhotosColumns, SyncConstValue {
1869 /**
1870 * no public constructor since this is a utility class
1871 */
1872 private Photos() {}
1873
1874 /**
1875 * The content:// style URL for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001876 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001877 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001878 @Deprecated
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001879 public static final Uri CONTENT_URI = Uri.parse("content://contacts/photos");
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001880
1881 /**
1882 * The directory twig for this sub-table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001883 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001884 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001885 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001886 public static final String CONTENT_DIRECTORY = "photo";
1887
1888 /**
1889 * The default sort order for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001890 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001891 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001892 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001893 public static final String DEFAULT_SORT_ORDER = "person ASC";
1894 }
1895
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001896 /**
1897 * @deprecated see {@link android.provider.ContactsContract}
1898 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001899 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001900 public interface ExtensionsColumns {
1901 /**
1902 * The name of this extension. May not be null. There may be at most one row for each name.
1903 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001904 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001905 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001906 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001907 public static final String NAME = "name";
1908
1909 /**
1910 * The value of this extension. May not be null.
1911 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001912 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001913 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001914 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001915 public static final String VALUE = "value";
1916 }
1917
1918 /**
1919 * The extensions for a person
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001920 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001921 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001922 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001923 public static final class Extensions implements BaseColumns, ExtensionsColumns {
1924 /**
1925 * no public constructor since this is a utility class
1926 */
1927 private Extensions() {}
1928
1929 /**
1930 * The content:// style URL for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001931 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001932 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001933 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001934 public static final Uri CONTENT_URI =
1935 Uri.parse("content://contacts/extensions");
1936
1937 /**
1938 * The MIME type of {@link #CONTENT_URI} providing a directory of
1939 * phones.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001940 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001941 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001942 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001943 public static final String CONTENT_TYPE = "vnd.android.cursor.dir/contact_extensions";
1944
1945 /**
1946 * The MIME type of a {@link #CONTENT_URI} subdirectory of a single
1947 * phone.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001948 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001949 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001950 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001951 public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/contact_extensions";
Jeff Sharkey534aa012009-08-25 14:33:44 -07001952
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001953 /**
1954 * The default sort order for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001955 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001956 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001957 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001958 public static final String DEFAULT_SORT_ORDER = "person, name ASC";
1959
1960 /**
1961 * The ID of the person this phone number is assigned to.
1962 * <P>Type: INTEGER (long)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001963 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001964 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001965 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001966 public static final String PERSON_ID = "person";
1967 }
1968
1969 /**
1970 * Contains helper classes used to create or manage {@link android.content.Intent Intents}
1971 * that involve contacts.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001972 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001973 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001974 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001975 public static final class Intents {
Dianne Hackborn29e4a3c2009-09-30 22:35:40 -07001976 /**
1977 * @deprecated see {@link android.provider.ContactsContract}
1978 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001979 @Deprecated
1980 public Intents() {
1981 }
1982
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001983 /**
1984 * This is the intent that is fired when a search suggestion is clicked on.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001985 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001986 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001987 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001988 public static final String SEARCH_SUGGESTION_CLICKED =
Evan Millardc2da5f2009-06-18 16:07:13 -07001989 ContactsContract.Intents.SEARCH_SUGGESTION_CLICKED;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001990
1991 /**
Evan Millardc2da5f2009-06-18 16:07:13 -07001992 * 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 -07001993 * is clicked on.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001994 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001995 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001996 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001997 public static final String SEARCH_SUGGESTION_DIAL_NUMBER_CLICKED =
Evan Millardc2da5f2009-06-18 16:07:13 -07001998 ContactsContract.Intents.SEARCH_SUGGESTION_DIAL_NUMBER_CLICKED;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001999
2000 /**
2001 * This is the intent that is fired when a search suggestion for creating a contact
2002 * is clicked on.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002003 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002004 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002005 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002006 public static final String SEARCH_SUGGESTION_CREATE_CONTACT_CLICKED =
Evan Millardc2da5f2009-06-18 16:07:13 -07002007 ContactsContract.Intents.SEARCH_SUGGESTION_CREATE_CONTACT_CLICKED;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002008
2009 /**
2010 * Starts an Activity that lets the user pick a contact to attach an image to.
2011 * After picking the contact it launches the image cropper in face detection mode.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002012 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002013 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002014 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002015 public static final String ATTACH_IMAGE = ContactsContract.Intents.ATTACH_IMAGE;
The Android Open Source Projectc39a6e02009-03-11 12:11:56 -07002016
2017 /**
2018 * Takes as input a data URI with a mailto: or tel: scheme. If a single
2019 * contact exists with the given data it will be shown. If no contact
2020 * exists, a dialog will ask the user if they want to create a new
2021 * contact with the provided details filled in. If multiple contacts
2022 * share the data the user will be prompted to pick which contact they
2023 * want to view.
2024 * <p>
2025 * For <code>mailto:</code> URIs, the scheme specific portion must be a
2026 * raw email address, such as one built using
2027 * {@link Uri#fromParts(String, String, String)}.
2028 * <p>
2029 * For <code>tel:</code> URIs, the scheme specific portion is compared
2030 * to existing numbers using the standard caller ID lookup algorithm.
2031 * The number must be properly encoded, for example using
2032 * {@link Uri#fromParts(String, String, String)}.
2033 * <p>
2034 * Any extras from the {@link Insert} class will be passed along to the
2035 * create activity if there are no contacts to show.
2036 * <p>
2037 * Passing true for the {@link #EXTRA_FORCE_CREATE} extra will skip
2038 * prompting the user when the contact doesn't exist.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002039 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectc39a6e02009-03-11 12:11:56 -07002040 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002041 @Deprecated
The Android Open Source Projectc39a6e02009-03-11 12:11:56 -07002042 public static final String SHOW_OR_CREATE_CONTACT =
Evan Millardc2da5f2009-06-18 16:07:13 -07002043 ContactsContract.Intents.SHOW_OR_CREATE_CONTACT;
The Android Open Source Projectc39a6e02009-03-11 12:11:56 -07002044
2045 /**
The Android Open Source Project10592532009-03-18 17:39:46 -07002046 * Used with {@link #SHOW_OR_CREATE_CONTACT} to force creating a new
2047 * contact if no matching contact found. Otherwise, default behavior is
2048 * to prompt user with dialog before creating.
2049 * <p>
2050 * Type: BOOLEAN
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002051 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectc39a6e02009-03-11 12:11:56 -07002052 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002053 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002054 public static final String EXTRA_FORCE_CREATE = ContactsContract.Intents.EXTRA_FORCE_CREATE;
2055
The Android Open Source Project10592532009-03-18 17:39:46 -07002056 /**
2057 * Used with {@link #SHOW_OR_CREATE_CONTACT} to specify an exact
2058 * description to be shown when prompting user about creating a new
2059 * contact.
2060 * <p>
2061 * Type: STRING
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002062 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project10592532009-03-18 17:39:46 -07002063 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002064 @Deprecated
The Android Open Source Project10592532009-03-18 17:39:46 -07002065 public static final String EXTRA_CREATE_DESCRIPTION =
Evan Millardc2da5f2009-06-18 16:07:13 -07002066 ContactsContract.Intents.EXTRA_CREATE_DESCRIPTION;
The Android Open Source Projectc39a6e02009-03-11 12:11:56 -07002067
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002068 /**
Jeff Sharkey11322002009-06-04 17:25:51 -07002069 * Optional extra used with {@link #SHOW_OR_CREATE_CONTACT} to specify a
2070 * dialog location using screen coordinates. When not specified, the
2071 * dialog will be centered.
2072 *
2073 * @hide pending API council review
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002074 * @deprecated see {@link android.provider.ContactsContract}
Jeff Sharkey11322002009-06-04 17:25:51 -07002075 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002076 @Deprecated
Jeff Sharkey11322002009-06-04 17:25:51 -07002077 public static final String EXTRA_TARGET_RECT = ContactsContract.Intents.EXTRA_TARGET_RECT;
2078
2079 /**
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002080 * Intents related to the Contacts app UI.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002081 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002082 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002083 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002084 public static final class UI {
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002085 /**
2086 * @deprecated see {@link android.provider.ContactsContract}
2087 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002088 @Deprecated
2089 public UI() {
2090 }
2091
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002092 /**
2093 * The action for the default contacts list tab.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002094 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002095 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002096 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002097 public static final String LIST_DEFAULT = ContactsContract.Intents.UI.LIST_DEFAULT;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002098
2099 /**
2100 * The action for the contacts list tab.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002101 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002102 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002103 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002104 public static final String LIST_GROUP_ACTION =
Evan Millardc2da5f2009-06-18 16:07:13 -07002105 ContactsContract.Intents.UI.LIST_GROUP_ACTION;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002106
2107 /**
2108 * When in LIST_GROUP_ACTION mode, this is the group to display.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002109 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002110 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002111 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002112 public static final String GROUP_NAME_EXTRA_KEY =
2113 ContactsContract.Intents.UI.GROUP_NAME_EXTRA_KEY;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002114 /**
2115 * The action for the all contacts list tab.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002116 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002117 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002118 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002119 public static final String LIST_ALL_CONTACTS_ACTION =
Evan Millardc2da5f2009-06-18 16:07:13 -07002120 ContactsContract.Intents.UI.LIST_ALL_CONTACTS_ACTION;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002121
2122 /**
2123 * The action for the contacts with phone numbers list tab.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002124 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002125 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002126 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002127 public static final String LIST_CONTACTS_WITH_PHONES_ACTION =
Evan Millardc2da5f2009-06-18 16:07:13 -07002128 ContactsContract.Intents.UI.LIST_CONTACTS_WITH_PHONES_ACTION;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002129
2130 /**
2131 * The action for the starred contacts list tab.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002132 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002133 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002134 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002135 public static final String LIST_STARRED_ACTION =
Evan Millardc2da5f2009-06-18 16:07:13 -07002136 ContactsContract.Intents.UI.LIST_STARRED_ACTION;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002137
2138 /**
2139 * The action for the frequent contacts list tab.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002140 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002141 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002142 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002143 public static final String LIST_FREQUENT_ACTION =
Evan Millardc2da5f2009-06-18 16:07:13 -07002144 ContactsContract.Intents.UI.LIST_FREQUENT_ACTION;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002145
2146 /**
2147 * The action for the "strequent" contacts list tab. It first lists the starred
2148 * contacts in alphabetical order and then the frequent contacts in descending
2149 * order of the number of times they have been contacted.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002150 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002151 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002152 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002153 public static final String LIST_STREQUENT_ACTION =
Evan Millardc2da5f2009-06-18 16:07:13 -07002154 ContactsContract.Intents.UI.LIST_STREQUENT_ACTION;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002155
2156 /**
2157 * A key for to be used as an intent extra to set the activity
2158 * title to a custom String value.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002159 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002160 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002161 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002162 public static final String TITLE_EXTRA_KEY =
Evan Millardc2da5f2009-06-18 16:07:13 -07002163 ContactsContract.Intents.UI.TITLE_EXTRA_KEY;
2164
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002165 /**
2166 * Activity Action: Display a filtered list of contacts
2167 * <p>
2168 * Input: Extra field {@link #FILTER_TEXT_EXTRA_KEY} is the text to use for
2169 * filtering
2170 * <p>
2171 * Output: Nothing.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002172 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002173 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002174 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002175 public static final String FILTER_CONTACTS_ACTION =
2176 ContactsContract.Intents.UI.FILTER_CONTACTS_ACTION;
2177
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002178 /**
2179 * Used as an int extra field in {@link #FILTER_CONTACTS_ACTION}
2180 * intents to supply the text on which to filter.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002181 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002182 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002183 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002184 public static final String FILTER_TEXT_EXTRA_KEY =
2185 ContactsContract.Intents.UI.FILTER_TEXT_EXTRA_KEY;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002186 }
2187
2188 /**
2189 * Convenience class that contains string constants used
2190 * to create contact {@link android.content.Intent Intents}.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002191 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002192 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002193 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002194 public static final class Insert {
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002195 /**
2196 * @deprecated see {@link android.provider.ContactsContract}
2197 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002198 @Deprecated
2199 public Insert() {
2200 }
2201
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002202 /** The action code to use when adding a contact
2203 * @deprecated see {@link android.provider.ContactsContract}
2204 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002205 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002206 public static final String ACTION = ContactsContract.Intents.Insert.ACTION;
Jeff Sharkey534aa012009-08-25 14:33:44 -07002207
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002208 /**
2209 * If present, forces a bypass of quick insert mode.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002210 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002211 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002212 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002213 public static final String FULL_MODE = ContactsContract.Intents.Insert.FULL_MODE;
Jeff Sharkey534aa012009-08-25 14:33:44 -07002214
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002215 /**
2216 * The extra field for the contact name.
2217 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002218 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002219 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002220 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002221 public static final String NAME = ContactsContract.Intents.Insert.NAME;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002222
2223 /**
The Android Open Source Projectb7986892009-01-09 17:51:23 -08002224 * The extra field for the contact phonetic name.
2225 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002226 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectb7986892009-01-09 17:51:23 -08002227 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002228 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002229 public static final String PHONETIC_NAME =
2230 ContactsContract.Intents.Insert.PHONETIC_NAME;
The Android Open Source Projectb7986892009-01-09 17:51:23 -08002231
2232 /**
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002233 * The extra field for the contact company.
2234 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002235 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002236 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002237 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002238 public static final String COMPANY = ContactsContract.Intents.Insert.COMPANY;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002239
2240 /**
2241 * The extra field for the contact job title.
2242 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002243 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002244 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002245 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002246 public static final String JOB_TITLE = ContactsContract.Intents.Insert.JOB_TITLE;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002247
2248 /**
2249 * The extra field for the contact notes.
2250 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002251 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002252 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002253 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002254 public static final String NOTES = ContactsContract.Intents.Insert.NOTES;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002255
2256 /**
2257 * The extra field for the contact phone number.
2258 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002259 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002260 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002261 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002262 public static final String PHONE = ContactsContract.Intents.Insert.PHONE;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002263
2264 /**
2265 * The extra field for the contact phone number type.
2266 * <P>Type: Either an integer value from {@link android.provider.Contacts.PhonesColumns PhonesColumns},
The Android Open Source Projectb7986892009-01-09 17:51:23 -08002267 * or a string specifying a custom label.</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002268 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002269 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002270 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002271 public static final String PHONE_TYPE = ContactsContract.Intents.Insert.PHONE_TYPE;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002272
2273 /**
2274 * The extra field for the phone isprimary flag.
2275 * <P>Type: boolean</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002276 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002277 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002278 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002279 public static final String PHONE_ISPRIMARY =
2280 ContactsContract.Intents.Insert.PHONE_ISPRIMARY;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002281
2282 /**
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002283 * The extra field for an optional second contact phone number.
2284 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002285 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002286 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002287 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002288 public static final String SECONDARY_PHONE =
2289 ContactsContract.Intents.Insert.SECONDARY_PHONE;
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002290
2291 /**
2292 * The extra field for an optional second contact phone number type.
2293 * <P>Type: Either an integer value from {@link android.provider.Contacts.PhonesColumns PhonesColumns},
The Android Open Source Projectb7986892009-01-09 17:51:23 -08002294 * or a string specifying a custom label.</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002295 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002296 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002297 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002298 public static final String SECONDARY_PHONE_TYPE =
2299 ContactsContract.Intents.Insert.SECONDARY_PHONE_TYPE;
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002300
2301 /**
2302 * The extra field for an optional third contact phone number.
2303 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002304 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002305 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002306 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002307 public static final String TERTIARY_PHONE =
2308 ContactsContract.Intents.Insert.TERTIARY_PHONE;
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002309
2310 /**
2311 * The extra field for an optional third contact phone number type.
2312 * <P>Type: Either an integer value from {@link android.provider.Contacts.PhonesColumns PhonesColumns},
The Android Open Source Projectb7986892009-01-09 17:51:23 -08002313 * or a string specifying a custom label.</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002314 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002315 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002316 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002317 public static final String TERTIARY_PHONE_TYPE =
2318 ContactsContract.Intents.Insert.TERTIARY_PHONE_TYPE;
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002319
2320 /**
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002321 * The extra field for the contact email address.
2322 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002323 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002324 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002325 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002326 public static final String EMAIL = ContactsContract.Intents.Insert.EMAIL;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002327
2328 /**
2329 * The extra field for the contact email type.
2330 * <P>Type: Either an integer value from {@link android.provider.Contacts.ContactMethodsColumns ContactMethodsColumns}
The Android Open Source Projectb7986892009-01-09 17:51:23 -08002331 * or a string specifying a custom label.</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002332 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002333 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002334 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002335 public static final String EMAIL_TYPE = ContactsContract.Intents.Insert.EMAIL_TYPE;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002336
2337 /**
2338 * The extra field for the email isprimary flag.
2339 * <P>Type: boolean</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002340 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002341 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002342 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002343 public static final String EMAIL_ISPRIMARY =
2344 ContactsContract.Intents.Insert.EMAIL_ISPRIMARY;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002345
2346 /**
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002347 * The extra field for an optional second contact email address.
2348 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002349 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002350 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002351 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002352 public static final String SECONDARY_EMAIL =
2353 ContactsContract.Intents.Insert.SECONDARY_EMAIL;
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002354
2355 /**
2356 * The extra field for an optional second contact email type.
2357 * <P>Type: Either an integer value from {@link android.provider.Contacts.ContactMethodsColumns ContactMethodsColumns}
The Android Open Source Projectb7986892009-01-09 17:51:23 -08002358 * or a string specifying a custom label.</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002359 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002360 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002361 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002362 public static final String SECONDARY_EMAIL_TYPE =
2363 ContactsContract.Intents.Insert.SECONDARY_EMAIL_TYPE;
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002364
2365 /**
2366 * The extra field for an optional third contact email address.
2367 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002368 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002369 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002370 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002371 public static final String TERTIARY_EMAIL =
2372 ContactsContract.Intents.Insert.TERTIARY_EMAIL;
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002373
2374 /**
2375 * The extra field for an optional third contact email type.
2376 * <P>Type: Either an integer value from {@link android.provider.Contacts.ContactMethodsColumns ContactMethodsColumns}
The Android Open Source Projectb7986892009-01-09 17:51:23 -08002377 * or a string specifying a custom label.</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002378 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002379 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002380 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002381 public static final String TERTIARY_EMAIL_TYPE =
2382 ContactsContract.Intents.Insert.TERTIARY_EMAIL_TYPE;
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002383
2384 /**
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002385 * The extra field for the contact postal address.
2386 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002387 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002388 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002389 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002390 public static final String POSTAL = ContactsContract.Intents.Insert.POSTAL;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002391
2392 /**
2393 * The extra field for the contact postal address type.
2394 * <P>Type: Either an integer value from {@link android.provider.Contacts.ContactMethodsColumns ContactMethodsColumns}
The Android Open Source Projectb7986892009-01-09 17:51:23 -08002395 * or a string specifying a custom label.</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002396 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002397 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002398 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002399 public static final String POSTAL_TYPE = ContactsContract.Intents.Insert.POSTAL_TYPE;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002400
2401 /**
2402 * The extra field for the postal isprimary flag.
2403 * <P>Type: boolean</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002404 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002405 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002406 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002407 public static final String POSTAL_ISPRIMARY = ContactsContract.Intents.Insert.POSTAL_ISPRIMARY;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002408
2409 /**
2410 * The extra field for an IM handle.
2411 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002412 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002413 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002414 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002415 public static final String IM_HANDLE = ContactsContract.Intents.Insert.IM_HANDLE;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002416
2417 /**
2418 * The extra field for the IM protocol
2419 * <P>Type: the result of {@link Contacts.ContactMethods#encodePredefinedImProtocol}
2420 * or {@link Contacts.ContactMethods#encodeCustomImProtocol}.</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002421 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002422 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002423 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002424 public static final String IM_PROTOCOL = ContactsContract.Intents.Insert.IM_PROTOCOL;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002425
2426 /**
2427 * The extra field for the IM isprimary flag.
2428 * <P>Type: boolean</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002429 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002430 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002431 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002432 public static final String IM_ISPRIMARY = ContactsContract.Intents.Insert.IM_ISPRIMARY;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002433 }
2434 }
2435}