blob: 42d5ce168fa9b2024c51edbdf660fcdab65fb586 [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
Jeff Sharkey0f3f60b2017-04-24 18:06:20 -060021import android.annotation.SdkConstant;
22import android.annotation.SdkConstant.SdkConstantType;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070023import android.content.ContentResolver;
24import android.content.ContentUris;
25import android.content.ContentValues;
26import android.content.Context;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070027import android.database.Cursor;
28import android.graphics.Bitmap;
29import android.graphics.BitmapFactory;
30import android.net.Uri;
31import android.text.TextUtils;
32import android.util.Log;
33import android.widget.ImageView;
34
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070035import java.io.ByteArrayInputStream;
36import java.io.InputStream;
37
38/**
39 * The Contacts provider stores all information about contacts.
Jeff Hamiltonf8526982009-09-24 11:34:58 -050040 *
41 * @deprecated The APIs have been superseded by {@link ContactsContract}. The newer APIs allow
42 * access multiple accounts and support aggregation of similar contacts. These APIs continue to
43 * work but will only return data for the first Google account created, which matches the original
44 * behavior.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070045 */
Jeff Sharkey534aa012009-08-25 14:33:44 -070046@Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070047public class Contacts {
48 private static final String TAG = "Contacts";
Evan Millardc2da5f2009-06-18 16:07:13 -070049
Jeff Hamiltonf8526982009-09-24 11:34:58 -050050 /**
51 * @deprecated see {@link android.provider.ContactsContract}
52 */
Jeff Sharkey534aa012009-08-25 14:33:44 -070053 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070054 public static final String AUTHORITY = "contacts";
55
56 /**
57 * The content:// style URL for this provider
Jeff Hamiltonf8526982009-09-24 11:34:58 -050058 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070059 */
Jeff Sharkey534aa012009-08-25 14:33:44 -070060 @Deprecated
Jeff Hamiltonf8526982009-09-24 11:34:58 -050061 public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY);
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070062
Yorke Lee1ca440b2014-06-04 18:01:46 -070063 /**
Jeff Hamiltonf8526982009-09-24 11:34:58 -050064 * Signifies an email address row that is stored in the ContactMethods table
65 * @deprecated see {@link android.provider.ContactsContract}
66 */
Jeff Sharkey534aa012009-08-25 14:33:44 -070067 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070068 public static final int KIND_EMAIL = 1;
Jeff Hamiltonf8526982009-09-24 11:34:58 -050069 /**
70 * Signifies a postal address row that is stored in the ContactMethods table
71 * @deprecated see {@link android.provider.ContactsContract}
72 */
Jeff Sharkey534aa012009-08-25 14:33:44 -070073 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070074 public static final int KIND_POSTAL = 2;
Jeff Hamiltonf8526982009-09-24 11:34:58 -050075 /**
76 * Signifies an IM address row that is stored in the ContactMethods table
77 * @deprecated see {@link android.provider.ContactsContract}
78 */
Jeff Sharkey534aa012009-08-25 14:33:44 -070079 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070080 public static final int KIND_IM = 3;
Jeff Hamiltonf8526982009-09-24 11:34:58 -050081 /**
82 * Signifies an Organization row that is stored in the Organizations table
83 * @deprecated see {@link android.provider.ContactsContract}
84 */
Jeff Sharkey534aa012009-08-25 14:33:44 -070085 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070086 public static final int KIND_ORGANIZATION = 4;
Jeff Hamiltonf8526982009-09-24 11:34:58 -050087 /**
Ken Wakasaf76a50c2012-03-09 19:56:35 +090088 * Signifies a Phone row that is stored in the Phones table
Jeff Hamiltonf8526982009-09-24 11:34:58 -050089 * @deprecated see {@link android.provider.ContactsContract}
90 */
Jeff Sharkey534aa012009-08-25 14:33:44 -070091 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -070092 public static final int KIND_PHONE = 5;
93
94 /**
95 * no public constructor since this is a utility class
96 */
97 private Contacts() {}
98
99 /**
100 * Columns from the Settings table that other columns join into themselves.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500101 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700102 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700103 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700104 public interface SettingsColumns {
105 /**
106 * The _SYNC_ACCOUNT to which this setting corresponds. This may be null.
107 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500108 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700109 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700110 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700111 public static final String _SYNC_ACCOUNT = "_sync_account";
112
113 /**
Fred Quintanad9d2f112009-04-23 13:36:27 -0700114 * The _SYNC_ACCOUNT_TYPE to which this setting corresponds. This may be null.
115 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500116 * @deprecated see {@link android.provider.ContactsContract}
Fred Quintanad9d2f112009-04-23 13:36:27 -0700117 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700118 @Deprecated
Fred Quintanad9d2f112009-04-23 13:36:27 -0700119 public static final String _SYNC_ACCOUNT_TYPE = "_sync_account_type";
120
121 /**
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700122 * The key of this setting.
123 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500124 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700125 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700126 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700127 public static final String KEY = "key";
128
129 /**
130 * The value of this setting.
131 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500132 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700133 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700134 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700135 public static final String VALUE = "value";
136 }
137
138 /**
139 * The settings over all of the people
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500140 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700141 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700142 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700143 public static final class Settings implements BaseColumns, SettingsColumns {
144 /**
145 * no public constructor since this is a utility class
146 */
147 private Settings() {}
148
149 /**
150 * The content:// style URL for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500151 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700152 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700153 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700154 public static final Uri CONTENT_URI =
155 Uri.parse("content://contacts/settings");
156
157 /**
158 * The directory twig for this sub-table
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500159 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700160 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700161 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700162 public static final String CONTENT_DIRECTORY = "settings";
163
164 /**
165 * The default sort order for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500166 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700167 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700168 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700169 public static final String DEFAULT_SORT_ORDER = "key ASC";
170
171 /**
172 * A setting that is used to indicate if we should sync down all groups for the
173 * specified account. For this setting the _SYNC_ACCOUNT column must be set.
174 * If this isn't set then we will only sync the groups whose SHOULD_SYNC column
175 * is set to true.
176 * <p>
177 * This is a boolean setting. It is true if it is set and it is anything other than the
178 * emptry string or "0".
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500179 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700180 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700181 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700182 public static final String SYNC_EVERYTHING = "syncEverything";
183
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500184 /**
185 * @deprecated see {@link android.provider.ContactsContract}
186 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700187 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700188 public static String getSetting(ContentResolver cr, String account, String key) {
189 // For now we only support a single account and the UI doesn't know what
190 // the account name is, so we're using a global setting for SYNC_EVERYTHING.
191 // Some day when we add multiple accounts to the UI this should honor the account
192 // that was asked for.
193 String selectString;
194 String[] selectArgs;
195 if (false) {
196 selectString = (account == null)
197 ? "_sync_account is null AND key=?"
198 : "_sync_account=? AND key=?";
Fred Quintanad9d2f112009-04-23 13:36:27 -0700199// : "_sync_account=? AND _sync_account_type=? AND key=?";
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700200 selectArgs = (account == null)
201 ? new String[]{key}
202 : new String[]{account, key};
203 } else {
204 selectString = "key=?";
205 selectArgs = new String[] {key};
206 }
207 Cursor cursor = cr.query(Settings.CONTENT_URI, new String[]{VALUE},
208 selectString, selectArgs, null);
209 try {
210 if (!cursor.moveToNext()) return null;
211 return cursor.getString(0);
212 } finally {
213 cursor.close();
214 }
215 }
216
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500217 /**
218 * @deprecated see {@link android.provider.ContactsContract}
219 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700220 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700221 public static void setSetting(ContentResolver cr, String account, String key,
222 String value) {
223 ContentValues values = new ContentValues();
224 // For now we only support a single account and the UI doesn't know what
225 // the account name is, so we're using a global setting for SYNC_EVERYTHING.
226 // Some day when we add multiple accounts to the UI this should honor the account
227 // that was asked for.
Fred Quintanad9d2f112009-04-23 13:36:27 -0700228 //values.put(_SYNC_ACCOUNT, account.mName);
229 //values.put(_SYNC_ACCOUNT_TYPE, account.mType);
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700230 values.put(KEY, key);
231 values.put(VALUE, value);
232 cr.update(Settings.CONTENT_URI, values, null, null);
233 }
234 }
235
236 /**
237 * Columns from the People table that other tables join into themselves.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500238 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700239 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700240 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700241 public interface PeopleColumns {
242 /**
The Android Open Source Projectb7986892009-01-09 17:51:23 -0800243 * The person's name.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700244 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500245 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700246 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700247 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700248 public static final String NAME = "name";
249
250 /**
The Android Open Source Projectb7986892009-01-09 17:51:23 -0800251 * Phonetic equivalent of the person's name, in a locale-dependent
252 * character set (e.g. hiragana for Japanese).
253 * Used for pronunciation and/or collation in some languages.
254 * <p>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500255 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectb7986892009-01-09 17:51:23 -0800256 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700257 @Deprecated
The Android Open Source Projectb7986892009-01-09 17:51:23 -0800258 public static final String PHONETIC_NAME = "phonetic_name";
Evan Millardc2da5f2009-06-18 16:07:13 -0700259
The Android Open Source Projectb7986892009-01-09 17:51:23 -0800260 /**
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700261 * The display name. If name is not null name, else if number is not null number,
262 * else if email is not null email.
263 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500264 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700265 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700266 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700267 public static final String DISPLAY_NAME = "display_name";
268
269 /**
The Android Open Source Projectba87e3e2009-03-13 13:04:22 -0700270 * The field for sorting list phonetically. The content of this field
271 * may not be human readable but phonetically sortable.
272 * <P>Type: TEXT</p>
273 * @hide Used only in Contacts application for now.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500274 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectba87e3e2009-03-13 13:04:22 -0700275 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700276 @Deprecated
The Android Open Source Projectba87e3e2009-03-13 13:04:22 -0700277 public static final String SORT_STRING = "sort_string";
Evan Millardc2da5f2009-06-18 16:07:13 -0700278
The Android Open Source Projectba87e3e2009-03-13 13:04:22 -0700279 /**
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700280 * Notes about the person.
281 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500282 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700283 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700284 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700285 public static final String NOTES = "notes";
286
287 /**
288 * The number of times a person has been contacted
289 * <P>Type: INTEGER</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500290 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700291 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700292 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700293 public static final String TIMES_CONTACTED = "times_contacted";
294
295 /**
296 * The last time a person was contacted.
297 * <P>Type: INTEGER</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500298 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700299 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700300 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700301 public static final String LAST_TIME_CONTACTED = "last_time_contacted";
302
303 /**
304 * A custom ringtone associated with a person. Not always present.
305 * <P>Type: TEXT (URI to the ringtone)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500306 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700307 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700308 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700309 public static final String CUSTOM_RINGTONE = "custom_ringtone";
310
311 /**
312 * Whether the person should always be sent to voicemail. Not always
313 * present.
314 * <P>Type: INTEGER (0 for false, 1 for true)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500315 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700316 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700317 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700318 public static final String SEND_TO_VOICEMAIL = "send_to_voicemail";
319
320 /**
321 * Is the contact starred?
322 * <P>Type: INTEGER (boolean)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500323 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700324 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700325 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700326 public static final String STARRED = "starred";
327
328 /**
329 * The server version of the photo
330 * <P>Type: TEXT (the version number portion of the photo URI)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500331 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700332 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700333 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -0700334 public static final String PHOTO_VERSION = "photo_version";
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700335 }
336
337 /**
338 * This table contains people.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500339 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700340 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700341 @Deprecated
Yorke Lee1ca440b2014-06-04 18:01:46 -0700342 public static final class People implements BaseColumns, PeopleColumns,
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700343 PhonesColumns, PresenceColumns {
344 /**
345 * no public constructor since this is a utility class
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500346 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700347 */
Aurimas Liutikas514c5ef2016-05-24 15:22:55 -0700348 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700349 private People() {}
350
351 /**
352 * The content:// style URL for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500353 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700354 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700355 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700356 public static final Uri CONTENT_URI =
357 Uri.parse("content://contacts/people");
358
359 /**
360 * The content:// style URL for filtering people by name. The filter
361 * argument should be passed as an additional path segment after this URI.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500362 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700363 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700364 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700365 public static final Uri CONTENT_FILTER_URI =
366 Uri.parse("content://contacts/people/filter");
367
368 /**
369 * The content:// style URL for the table that holds the deleted
370 * contacts.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500371 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700372 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700373 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700374 public static final Uri DELETED_CONTENT_URI =
375 Uri.parse("content://contacts/deleted_people");
376
377 /**
Jeffrey Sharkey51045182009-03-25 21:37:10 -0700378 * The content:// style URL for filtering people that have a specific
379 * E-mail or IM address. The filter argument should be passed as an
380 * additional path segment after this URI. This matches any people with
381 * at least one E-mail or IM {@link ContactMethods} that match the
382 * filter.
Evan Millardc2da5f2009-06-18 16:07:13 -0700383 *
Dianne Hackborn935ae462009-04-13 16:11:55 -0700384 * Not exposed because we expect significant changes in the contacts
385 * schema and do not want to have to support this.
386 * @hide
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500387 * @deprecated see {@link android.provider.ContactsContract}
Jeffrey Sharkey51045182009-03-25 21:37:10 -0700388 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700389 @Deprecated
Jeffrey Sharkey51045182009-03-25 21:37:10 -0700390 public static final Uri WITH_EMAIL_OR_IM_FILTER_URI =
391 Uri.parse("content://contacts/people/with_email_or_im_filter");
Evan Millardc2da5f2009-06-18 16:07:13 -0700392
Jeffrey Sharkey51045182009-03-25 21:37:10 -0700393 /**
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700394 * The MIME type of {@link #CONTENT_URI} providing a directory of
395 * people.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500396 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700397 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700398 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700399 public static final String CONTENT_TYPE = "vnd.android.cursor.dir/person";
400
401 /**
402 * The MIME type of a {@link #CONTENT_URI} subdirectory of a single
403 * person.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500404 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700405 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700406 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700407 public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/person";
408
409 /**
410 * The default sort order for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500411 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700412 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700413 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700414 public static final String DEFAULT_SORT_ORDER = People.NAME + " ASC";
415
416 /**
417 * The ID of the persons preferred phone number.
418 * <P>Type: INTEGER (foreign key to phones table on the _ID field)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500419 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700420 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700421 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700422 public static final String PRIMARY_PHONE_ID = "primary_phone";
423
424 /**
425 * The ID of the persons preferred email.
426 * <P>Type: INTEGER (foreign key to contact_methods table on the
427 * _ID field)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500428 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700429 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700430 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700431 public static final String PRIMARY_EMAIL_ID = "primary_email";
432
433 /**
434 * The ID of the persons preferred organization.
435 * <P>Type: INTEGER (foreign key to organizations table on the
436 * _ID field)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500437 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700438 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700439 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700440 public static final String PRIMARY_ORGANIZATION_ID = "primary_organization";
441
442 /**
Makoto Onuki203145e2016-09-28 15:41:29 -0700443 * This API is no longer supported as of O.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700444 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700445 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700446 public static void markAsContacted(ContentResolver resolver, long personId) {
Makoto Onuki203145e2016-09-28 15:41:29 -0700447 // No longer supported.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700448 }
449
450 /**
Daisuke Miyakawa6e9610e2009-05-19 08:51:39 +0900451 * @hide Used in vCard parser code.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500452 * @deprecated see {@link android.provider.ContactsContract}
Daisuke Miyakawa6e9610e2009-05-19 08:51:39 +0900453 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700454 @Deprecated
Daisuke Miyakawa6e9610e2009-05-19 08:51:39 +0900455 public static long tryGetMyContactsGroupId(ContentResolver resolver) {
456 Cursor groupsCursor = resolver.query(Groups.CONTENT_URI, GROUPS_PROJECTION,
457 Groups.SYSTEM_ID + "='" + Groups.GROUP_MY_CONTACTS + "'", null, null);
458 if (groupsCursor != null) {
459 try {
460 if (groupsCursor.moveToFirst()) {
461 return groupsCursor.getLong(0);
462 }
463 } finally {
464 groupsCursor.close();
465 }
466 }
467 return 0;
468 }
469
470 /**
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700471 * Adds a person to the My Contacts group.
Daisuke Miyakawa6e9610e2009-05-19 08:51:39 +0900472 *
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700473 * @param resolver the resolver to use
474 * @param personId the person to add to the group
475 * @return the URI of the group membership row
476 * @throws IllegalStateException if the My Contacts group can't be found
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500477 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700478 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700479 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700480 public static Uri addToMyContactsGroup(ContentResolver resolver, long personId) {
Daisuke Miyakawa6e9610e2009-05-19 08:51:39 +0900481 long groupId = tryGetMyContactsGroupId(resolver);
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700482 if (groupId == 0) {
483 throw new IllegalStateException("Failed to find the My Contacts group");
484 }
Evan Millardc2da5f2009-06-18 16:07:13 -0700485
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700486 return addToGroup(resolver, personId, groupId);
487 }
488
489 /**
490 * Adds a person to a group referred to by name.
Evan Millardc2da5f2009-06-18 16:07:13 -0700491 *
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700492 * @param resolver the resolver to use
493 * @param personId the person to add to the group
494 * @param groupName the name of the group to add the contact to
495 * @return the URI of the group membership row
496 * @throws IllegalStateException if the group can't be found
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500497 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700498 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700499 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700500 public static Uri addToGroup(ContentResolver resolver, long personId, String groupName) {
501 long groupId = 0;
502 Cursor groupsCursor = resolver.query(Groups.CONTENT_URI, GROUPS_PROJECTION,
503 Groups.NAME + "=?", new String[] { groupName }, null);
504 if (groupsCursor != null) {
505 try {
506 if (groupsCursor.moveToFirst()) {
507 groupId = groupsCursor.getLong(0);
508 }
509 } finally {
510 groupsCursor.close();
511 }
512 }
513
514 if (groupId == 0) {
515 throw new IllegalStateException("Failed to find the My Contacts group");
516 }
Evan Millardc2da5f2009-06-18 16:07:13 -0700517
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700518 return addToGroup(resolver, personId, groupId);
519 }
520
521 /**
522 * Adds a person to a group.
Evan Millardc2da5f2009-06-18 16:07:13 -0700523 *
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700524 * @param resolver the resolver to use
525 * @param personId the person to add to the group
526 * @param groupId the group to add the person to
527 * @return the URI of the group membership row
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500528 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700529 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700530 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700531 public static Uri addToGroup(ContentResolver resolver, long personId, long groupId) {
532 ContentValues values = new ContentValues();
533 values.put(GroupMembership.PERSON_ID, personId);
534 values.put(GroupMembership.GROUP_ID, groupId);
535 return resolver.insert(GroupMembership.CONTENT_URI, values);
536 }
Evan Millardc2da5f2009-06-18 16:07:13 -0700537
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700538 private static final String[] GROUPS_PROJECTION = new String[] {
539 Groups._ID,
540 };
541
542 /**
543 * Creates a new contacts and adds it to the "My Contacts" group.
Evan Millardc2da5f2009-06-18 16:07:13 -0700544 *
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700545 * @param resolver the ContentResolver to use
546 * @param values the values to use when creating the contact
547 * @return the URI of the contact, or null if the operation fails
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500548 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700549 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700550 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700551 public static Uri createPersonInMyContactsGroup(ContentResolver resolver,
552 ContentValues values) {
553
554 Uri contactUri = resolver.insert(People.CONTENT_URI, values);
555 if (contactUri == null) {
556 Log.e(TAG, "Failed to create the contact");
557 return null;
558 }
559
560 if (addToMyContactsGroup(resolver, ContentUris.parseId(contactUri)) == null) {
561 resolver.delete(contactUri, null, null);
562 return null;
563 }
564 return contactUri;
565 }
566
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500567 /**
568 * @deprecated see {@link android.provider.ContactsContract}
569 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700570 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700571 public static Cursor queryGroups(ContentResolver resolver, long person) {
572 return resolver.query(GroupMembership.CONTENT_URI, null, "person=?",
573 new String[]{String.valueOf(person)}, Groups.DEFAULT_SORT_ORDER);
574 }
575
576 /**
577 * Set the photo for this person. data may be null
578 * @param cr the ContentResolver to use
579 * @param person the Uri of the person whose photo is to be updated
580 * @param data the byte[] that represents the photo
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500581 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700582 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700583 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700584 public static void setPhotoData(ContentResolver cr, Uri person, byte[] data) {
585 Uri photoUri = Uri.withAppendedPath(person, Contacts.Photos.CONTENT_DIRECTORY);
586 ContentValues values = new ContentValues();
587 values.put(Photos.DATA, data);
588 cr.update(photoUri, values, null, null);
589 }
Evan Millardc2da5f2009-06-18 16:07:13 -0700590
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700591 /**
592 * Opens an InputStream for the person's photo and returns the photo as a Bitmap.
593 * If the person's photo isn't present returns the placeholderImageResource instead.
594 * @param person the person whose photo should be used
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500595 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700596 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700597 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700598 public static InputStream openContactPhotoInputStream(ContentResolver cr, Uri person) {
599 Uri photoUri = Uri.withAppendedPath(person, Contacts.Photos.CONTENT_DIRECTORY);
600 Cursor cursor = cr.query(photoUri, new String[]{Photos.DATA}, null, null, null);
601 try {
Jeff Hamilton8d570b32009-09-17 11:51:32 -0500602 if (cursor == null || !cursor.moveToNext()) {
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700603 return null;
604 }
605 byte[] data = cursor.getBlob(0);
606 if (data == null) {
607 return null;
608 }
609 return new ByteArrayInputStream(data);
610 } finally {
Jeff Sharkey42fc2c62009-09-15 13:50:31 -0700611 if (cursor != null) cursor.close();
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700612 }
613 }
614
615 /**
616 * Opens an InputStream for the person's photo and returns the photo as a Bitmap.
617 * If the person's photo isn't present returns the placeholderImageResource instead.
618 * @param context the Context
619 * @param person the person whose photo should be used
620 * @param placeholderImageResource the image resource to use if the person doesn't
621 * have a photo
622 * @param options the decoding options, can be set to null
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500623 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700624 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700625 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700626 public static Bitmap loadContactPhoto(Context context, Uri person,
627 int placeholderImageResource, BitmapFactory.Options options) {
628 if (person == null) {
629 return loadPlaceholderPhoto(placeholderImageResource, context, options);
630 }
631
632 InputStream stream = openContactPhotoInputStream(context.getContentResolver(), person);
633 Bitmap bm = stream != null ? BitmapFactory.decodeStream(stream, null, options) : null;
634 if (bm == null) {
635 bm = loadPlaceholderPhoto(placeholderImageResource, context, options);
636 }
637 return bm;
638 }
639
640 private static Bitmap loadPlaceholderPhoto(int placeholderImageResource, Context context,
641 BitmapFactory.Options options) {
642 if (placeholderImageResource == 0) {
643 return null;
644 }
645 return BitmapFactory.decodeResource(context.getResources(),
646 placeholderImageResource, options);
647 }
648
649 /**
650 * A sub directory of a single person that contains all of their Phones.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500651 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700652 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700653 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700654 public static final class Phones implements BaseColumns, PhonesColumns,
655 PeopleColumns {
656 /**
657 * no public constructor since this is a utility class
658 */
659 private Phones() {}
660
661 /**
662 * The directory twig for this sub-table
Dianne Hackborn29e4a3c2009-09-30 22:35:40 -0700663 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700664 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700665 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700666 public static final String CONTENT_DIRECTORY = "phones";
667
668 /**
669 * The default sort order for this table
Dianne Hackborn29e4a3c2009-09-30 22:35:40 -0700670 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700671 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700672 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700673 public static final String DEFAULT_SORT_ORDER = "number ASC";
674 }
675
676 /**
677 * A subdirectory of a single person that contains all of their
678 * ContactMethods.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500679 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700680 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700681 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700682 public static final class ContactMethods
683 implements BaseColumns, ContactMethodsColumns, PeopleColumns {
684 /**
685 * no public constructor since this is a utility class
686 */
687 private ContactMethods() {}
688
689 /**
690 * The directory twig for this sub-table
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500691 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700692 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700693 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700694 public static final String CONTENT_DIRECTORY = "contact_methods";
695
696 /**
697 * The default sort order for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500698 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700699 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700700 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700701 public static final String DEFAULT_SORT_ORDER = "data ASC";
702 }
703
704 /**
705 * The extensions for a person
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 class Extensions implements BaseColumns, ExtensionsColumns {
710 /**
711 * no public constructor since this is a utility class
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500712 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700713 */
Aurimas Liutikas514c5ef2016-05-24 15:22:55 -0700714 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700715 private Extensions() {}
716
717 /**
718 * The directory twig for this sub-table
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500719 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700720 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700721 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700722 public static final String CONTENT_DIRECTORY = "extensions";
723
724 /**
725 * The default sort order for this 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 DEFAULT_SORT_ORDER = "name ASC";
730
731 /**
732 * The ID of the person this phone number is assigned to.
733 * <P>Type: INTEGER (long)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500734 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700735 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700736 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700737 public static final String PERSON_ID = "person";
738 }
739 }
740
741 /**
742 * Columns from the groups table.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500743 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700744 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700745 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700746 public interface GroupsColumns {
747 /**
748 * The group name.
749 * <P>Type: TEXT</P>
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 static final String NAME = "name";
754
755 /**
756 * Notes about the group.
757 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500758 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700759 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700760 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700761 public static final String NOTES = "notes";
762
763 /**
764 * Whether this group should be synced if the SYNC_EVERYTHING settings is false
765 * for this group's account.
766 * <P>Type: INTEGER (boolean)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500767 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700768 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700769 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700770 public static final String SHOULD_SYNC = "should_sync";
771
772 /**
773 * The ID of this group if it is a System Group, null otherwise.
774 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500775 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700776 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700777 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700778 public static final String SYSTEM_ID = "system_id";
779 }
780
781 /**
782 * This table contains the groups for an account.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500783 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700784 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700785 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700786 public static final class Groups
Yorke Lee1ca440b2014-06-04 18:01:46 -0700787 implements BaseColumns, GroupsColumns {
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700788 /**
789 * no public constructor since this is a utility class
790 */
791 private Groups() {}
792
793 /**
794 * The content:// style URL for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500795 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700796 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700797 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700798 public static final Uri CONTENT_URI =
799 Uri.parse("content://contacts/groups");
800
801 /**
802 * The content:// style URL for the table that holds the deleted
803 * groups.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500804 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700805 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700806 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700807 public static final Uri DELETED_CONTENT_URI =
808 Uri.parse("content://contacts/deleted_groups");
809
810 /**
811 * The MIME type of {@link #CONTENT_URI} providing a directory of
812 * groups.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500813 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700814 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700815 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700816 public static final String CONTENT_TYPE = "vnd.android.cursor.dir/contactsgroup";
817
818 /**
819 * The MIME type of a {@link #CONTENT_URI} subdirectory of a single
820 * group.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500821 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700822 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700823 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700824 public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/contactsgroup";
825
826 /**
827 * The default sort order for this table
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 DEFAULT_SORT_ORDER = NAME + " ASC";
832
833 /**
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500834 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700835 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700836 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700837 public static final String GROUP_ANDROID_STARRED = "Starred in Android";
838
839 /**
840 * The "My Contacts" system group.
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_MY_CONTACTS = "Contacts";
845 }
846
847 /**
848 * Columns from the Phones table that other columns join into themselves.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500849 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700850 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700851 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700852 public interface PhonesColumns {
853 /**
854 * The type of the the phone number.
855 * <P>Type: INTEGER (one of the constants below)</P>
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 static final String TYPE = "type";
860
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500861 /**
862 * @deprecated see {@link android.provider.ContactsContract}
863 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700864 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700865 public static final int TYPE_CUSTOM = 0;
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500866 /**
867 * @deprecated see {@link android.provider.ContactsContract}
868 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700869 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700870 public static final int TYPE_HOME = 1;
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500871 /**
872 * @deprecated see {@link android.provider.ContactsContract}
873 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700874 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700875 public static final int TYPE_MOBILE = 2;
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500876 /**
877 * @deprecated see {@link android.provider.ContactsContract}
878 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700879 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700880 public static final int TYPE_WORK = 3;
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500881 /**
882 * @deprecated see {@link android.provider.ContactsContract}
883 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700884 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700885 public static final int TYPE_FAX_WORK = 4;
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500886 /**
887 * @deprecated see {@link android.provider.ContactsContract}
888 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700889 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700890 public static final int TYPE_FAX_HOME = 5;
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500891 /**
892 * @deprecated see {@link android.provider.ContactsContract}
893 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700894 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700895 public static final int TYPE_PAGER = 6;
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500896 /**
897 * @deprecated see {@link android.provider.ContactsContract}
898 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700899 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700900 public static final int TYPE_OTHER = 7;
901
902 /**
903 * The user provided label for the phone number, only used if TYPE is TYPE_CUSTOM.
904 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500905 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700906 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700907 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700908 public static final String LABEL = "label";
909
910 /**
911 * The phone number as the user entered it.
912 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500913 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700914 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700915 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700916 public static final String NUMBER = "number";
917
918 /**
919 * The normalized phone number
920 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500921 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700922 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700923 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700924 public static final String NUMBER_KEY = "number_key";
925
926 /**
927 * Whether this is the primary phone number
928 * <P>Type: INTEGER (if set, non-0 means true)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500929 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700930 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700931 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700932 public static final String ISPRIMARY = "isprimary";
933 }
934
935 /**
936 * This table stores phone numbers and a reference to the person that the
937 * contact method belongs to. Phone numbers are stored separately from
938 * other contact methods to make caller ID lookup more efficient.
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500939 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700940 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700941 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700942 public static final class Phones
943 implements BaseColumns, PhonesColumns, PeopleColumns {
944 /**
945 * no public constructor since this is a utility class
946 */
947 private Phones() {}
948
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500949 /**
950 * @deprecated see {@link android.provider.ContactsContract}
951 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700952 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700953 public static final CharSequence getDisplayLabel(Context context, int type,
954 CharSequence label, CharSequence[] labelArray) {
955 CharSequence display = "";
956
957 if (type != People.Phones.TYPE_CUSTOM) {
Evan Millardc2da5f2009-06-18 16:07:13 -0700958 CharSequence[] labels = labelArray != null? labelArray
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700959 : context.getResources().getTextArray(
960 com.android.internal.R.array.phoneTypes);
961 try {
962 display = labels[type - 1];
963 } catch (ArrayIndexOutOfBoundsException e) {
964 display = labels[People.Phones.TYPE_HOME - 1];
965 }
966 } else {
967 if (!TextUtils.isEmpty(label)) {
968 display = label;
969 }
970 }
971 return display;
972 }
973
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500974 /**
975 * @deprecated see {@link android.provider.ContactsContract}
976 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700977 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700978 public static final CharSequence getDisplayLabel(Context context, int type,
979 CharSequence label) {
980 return getDisplayLabel(context, type, label, null);
981 }
Evan Millardc2da5f2009-06-18 16:07:13 -0700982
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700983 /**
984 * The content:// style URL for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500985 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700986 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700987 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700988 public static final Uri CONTENT_URI =
989 Uri.parse("content://contacts/phones");
990
991 /**
992 * The content:// style URL for filtering phone numbers
Jeff Hamiltonf8526982009-09-24 11:34:58 -0500993 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700994 */
Jeff Sharkey534aa012009-08-25 14:33:44 -0700995 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -0700996 public static final Uri CONTENT_FILTER_URL =
997 Uri.parse("content://contacts/phones/filter");
998
999 /**
1000 * The MIME type of {@link #CONTENT_URI} providing a directory of
1001 * phones.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001002 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001003 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001004 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001005 public static final String CONTENT_TYPE = "vnd.android.cursor.dir/phone";
1006
1007 /**
1008 * The MIME type of a {@link #CONTENT_URI} subdirectory of a single
1009 * phone.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001010 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001011 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001012 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001013 public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/phone";
1014
1015 /**
1016 * The default sort order for this table
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 DEFAULT_SORT_ORDER = "name ASC";
1021
1022 /**
1023 * The ID of the person this phone number is assigned to.
1024 * <P>Type: INTEGER (long)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001025 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001026 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001027 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001028 public static final String PERSON_ID = "person";
1029 }
1030
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001031 /**
1032 * @deprecated see {@link android.provider.ContactsContract}
1033 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001034 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001035 public static final class GroupMembership implements BaseColumns, GroupsColumns {
1036 /**
1037 * no public constructor since this is a utility class
1038 */
1039 private GroupMembership() {}
1040
1041 /**
1042 * The content:// style URL for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001043 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001044 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001045 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001046 public static final Uri CONTENT_URI =
1047 Uri.parse("content://contacts/groupmembership");
1048
1049 /**
1050 * The content:// style URL for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001051 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001052 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001053 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001054 public static final Uri RAW_CONTENT_URI =
1055 Uri.parse("content://contacts/groupmembershipraw");
1056
1057 /**
1058 * The directory twig for this sub-table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001059 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001060 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001061 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001062 public static final String CONTENT_DIRECTORY = "groupmembership";
Jeff Sharkey534aa012009-08-25 14:33:44 -07001063
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001064 /**
1065 * The MIME type of {@link #CONTENT_URI} providing a directory of all
1066 * person groups.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001067 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001068 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001069 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001070 public static final String CONTENT_TYPE = "vnd.android.cursor.dir/contactsgroupmembership";
1071
1072 /**
1073 * The MIME type of a {@link #CONTENT_URI} subdirectory of a single
1074 * person group.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001075 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001076 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001077 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001078 public static final String CONTENT_ITEM_TYPE =
1079 "vnd.android.cursor.item/contactsgroupmembership";
1080
1081 /**
1082 * The default sort order for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001083 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001084 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001085 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001086 public static final String DEFAULT_SORT_ORDER = "group_id ASC";
1087
1088 /**
1089 * The row id of the accounts group.
1090 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001091 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001092 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001093 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001094 public static final String GROUP_ID = "group_id";
1095
1096 /**
1097 * The sync id of the group.
1098 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001099 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001100 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001101 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001102 public static final String GROUP_SYNC_ID = "group_sync_id";
1103
1104 /**
1105 * The account of the group.
1106 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001107 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001108 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001109 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001110 public static final String GROUP_SYNC_ACCOUNT = "group_sync_account";
1111
1112 /**
Fred Quintanad9d2f112009-04-23 13:36:27 -07001113 * The account type of the group.
1114 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001115 * @deprecated see {@link android.provider.ContactsContract}
Fred Quintanad9d2f112009-04-23 13:36:27 -07001116 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001117 @Deprecated
Fred Quintanad9d2f112009-04-23 13:36:27 -07001118 public static final String GROUP_SYNC_ACCOUNT_TYPE = "group_sync_account_type";
1119
1120 /**
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001121 * The row id of the person.
1122 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001123 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001124 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001125 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001126 public static final String PERSON_ID = "person";
1127 }
1128
1129 /**
1130 * Columns from the ContactMethods table that other tables join into
1131 * themseleves.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001132 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001133 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001134 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001135 public interface ContactMethodsColumns {
1136 /**
1137 * The kind of the the contact method. For example, email address,
1138 * postal address, etc.
1139 * <P>Type: INTEGER (one of the values below)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001140 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001141 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001142 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001143 public static final String KIND = "kind";
1144
1145 /**
1146 * The type of the contact method, must be one of the types below.
1147 * <P>Type: INTEGER (one of the values below)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001148 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001149 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001150 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001151 public static final String TYPE = "type";
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001152 /**
1153 * @deprecated see {@link android.provider.ContactsContract}
1154 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001155 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001156 public static final int TYPE_CUSTOM = 0;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001157 /**
1158 * @deprecated see {@link android.provider.ContactsContract}
1159 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001160 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001161 public static final int TYPE_HOME = 1;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001162 /**
1163 * @deprecated see {@link android.provider.ContactsContract}
1164 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001165 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001166 public static final int TYPE_WORK = 2;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001167 /**
1168 * @deprecated see {@link android.provider.ContactsContract}
1169 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001170 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001171 public static final int TYPE_OTHER = 3;
1172
1173 /**
Daisuke Miyakawa7c3e18c52009-05-19 23:13:14 +09001174 * @hide This is temporal. TYPE_MOBILE should be added to TYPE in the future.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001175 * @deprecated see {@link android.provider.ContactsContract}
Daisuke Miyakawa7c3e18c52009-05-19 23:13:14 +09001176 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001177 @Deprecated
Daisuke Miyakawa7c3e18c52009-05-19 23:13:14 +09001178 public static final int MOBILE_EMAIL_TYPE_INDEX = 2;
1179
1180 /**
1181 * @hide This is temporal. TYPE_MOBILE should be added to TYPE in the future.
1182 * This is not "mobile" but "CELL" since vCard uses it for identifying mobile phone.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001183 * @deprecated see {@link android.provider.ContactsContract}
Daisuke Miyakawa7c3e18c52009-05-19 23:13:14 +09001184 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001185 @Deprecated
Daisuke Miyakawa7c3e18c52009-05-19 23:13:14 +09001186 public static final String MOBILE_EMAIL_TYPE_NAME = "_AUTO_CELL";
1187
1188 /**
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001189 * The user defined label for the the contact method.
1190 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001191 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001192 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001193 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001194 public static final String LABEL = "label";
1195
1196 /**
1197 * The data for the contact method.
1198 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001199 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001200 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001201 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001202 public static final String DATA = "data";
1203
1204 /**
1205 * Auxiliary data for the contact method.
1206 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001207 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001208 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001209 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001210 public static final String AUX_DATA = "aux_data";
1211
1212 /**
1213 * Whether this is the primary organization
1214 * <P>Type: INTEGER (if set, non-0 means true)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001215 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001216 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001217 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001218 public static final String ISPRIMARY = "isprimary";
1219 }
1220
1221 /**
1222 * This table stores all non-phone contact methods and a reference to the
1223 * person that the contact method belongs to.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001224 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001225 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001226 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001227 public static final class ContactMethods
1228 implements BaseColumns, ContactMethodsColumns, PeopleColumns {
1229 /**
1230 * The column with latitude data for postal locations
1231 * <P>Type: REAL</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001232 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001233 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001234 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001235 public static final String POSTAL_LOCATION_LATITUDE = DATA;
1236
1237 /**
1238 * The column with longitude data for postal locations
1239 * <P>Type: REAL</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001240 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001241 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001242 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001243 public static final String POSTAL_LOCATION_LONGITUDE = AUX_DATA;
1244
1245 /**
1246 * The predefined IM protocol types. The protocol can either be non-present, one
1247 * of these types, or a free-form string. These cases are encoded in the AUX_DATA
1248 * column as:
1249 * - null
1250 * - pre:<an integer, one of the protocols below>
1251 * - custom:<a string>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001252 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001253 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001254 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001255 public static final int PROTOCOL_AIM = 0;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001256 /**
1257 * @deprecated see {@link android.provider.ContactsContract}
1258 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001259 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001260 public static final int PROTOCOL_MSN = 1;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001261 /**
1262 * @deprecated see {@link android.provider.ContactsContract}
1263 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001264 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001265 public static final int PROTOCOL_YAHOO = 2;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001266 /**
1267 * @deprecated see {@link android.provider.ContactsContract}
1268 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001269 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001270 public static final int PROTOCOL_SKYPE = 3;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001271 /**
1272 * @deprecated see {@link android.provider.ContactsContract}
1273 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001274 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001275 public static final int PROTOCOL_QQ = 4;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001276 /**
1277 * @deprecated see {@link android.provider.ContactsContract}
1278 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001279 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001280 public static final int PROTOCOL_GOOGLE_TALK = 5;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001281 /**
1282 * @deprecated see {@link android.provider.ContactsContract}
1283 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001284 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001285 public static final int PROTOCOL_ICQ = 6;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001286 /**
1287 * @deprecated see {@link android.provider.ContactsContract}
1288 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001289 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001290 public static final int PROTOCOL_JABBER = 7;
1291
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001292 /**
1293 * @deprecated see {@link android.provider.ContactsContract}
1294 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001295 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001296 public static String encodePredefinedImProtocol(int protocol) {
1297 return "pre:" + protocol;
1298 }
1299
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001300 /**
1301 * @deprecated see {@link android.provider.ContactsContract}
1302 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001303 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001304 public static String encodeCustomImProtocol(String protocolString) {
1305 return "custom:" + protocolString;
1306 }
1307
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001308 /**
1309 * @deprecated see {@link android.provider.ContactsContract}
1310 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001311 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001312 public static Object decodeImProtocol(String encodedString) {
1313 if (encodedString == null) {
1314 return null;
1315 }
1316
1317 if (encodedString.startsWith("pre:")) {
1318 return Integer.parseInt(encodedString.substring(4));
1319 }
1320
1321 if (encodedString.startsWith("custom:")) {
1322 return encodedString.substring(7);
1323 }
1324
1325 throw new IllegalArgumentException(
1326 "the value is not a valid encoded protocol, " + encodedString);
1327 }
Evan Millardc2da5f2009-06-18 16:07:13 -07001328
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001329 /**
Jeff Hamiltonf3960b12009-11-20 20:04:03 -08001330 * TODO find a place to put the canonical version of these.
1331 */
1332 interface ProviderNames {
1333 //
1334 //NOTE: update Contacts.java with new providers when they're added.
1335 //
1336 String YAHOO = "Yahoo";
1337 String GTALK = "GTalk";
1338 String MSN = "MSN";
1339 String ICQ = "ICQ";
1340 String AIM = "AIM";
1341 String XMPP = "XMPP";
1342 String JABBER = "JABBER";
1343 String SKYPE = "SKYPE";
1344 String QQ = "QQ";
1345 }
1346
1347 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001348 * This looks up the provider name defined in
Jeff Hamiltonf3960b12009-11-20 20:04:03 -08001349 * from the predefined IM protocol id.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001350 * This is used for interacting with the IM application.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001351 *
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001352 * @param protocol the protocol ID
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001353 * @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 -07001354 * provider is defined for the given protocol
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001355 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001356 * @hide
1357 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001358 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001359 public static String lookupProviderNameFromId(int protocol) {
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001360 switch (protocol) {
1361 case PROTOCOL_GOOGLE_TALK:
Jeff Hamiltonf3960b12009-11-20 20:04:03 -08001362 return ProviderNames.GTALK;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001363 case PROTOCOL_AIM:
Jeff Hamiltonf3960b12009-11-20 20:04:03 -08001364 return ProviderNames.AIM;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001365 case PROTOCOL_MSN:
Jeff Hamiltonf3960b12009-11-20 20:04:03 -08001366 return ProviderNames.MSN;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001367 case PROTOCOL_YAHOO:
Jeff Hamiltonf3960b12009-11-20 20:04:03 -08001368 return ProviderNames.YAHOO;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001369 case PROTOCOL_ICQ:
Jeff Hamiltonf3960b12009-11-20 20:04:03 -08001370 return ProviderNames.ICQ;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001371 case PROTOCOL_JABBER:
Jeff Hamiltonf3960b12009-11-20 20:04:03 -08001372 return ProviderNames.JABBER;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001373 case PROTOCOL_SKYPE:
Jeff Hamiltonf3960b12009-11-20 20:04:03 -08001374 return ProviderNames.SKYPE;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001375 case PROTOCOL_QQ:
Jeff Hamiltonf3960b12009-11-20 20:04:03 -08001376 return ProviderNames.QQ;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001377 }
1378 return null;
1379 }
1380
1381 /**
1382 * no public constructor since this is a utility class
1383 */
1384 private ContactMethods() {}
1385
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001386 /**
1387 * @deprecated see {@link android.provider.ContactsContract}
1388 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001389 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001390 public static final CharSequence getDisplayLabel(Context context, int kind,
1391 int type, CharSequence label) {
1392 CharSequence display = "";
1393 switch (kind) {
1394 case KIND_EMAIL: {
1395 if (type != People.ContactMethods.TYPE_CUSTOM) {
1396 CharSequence[] labels = context.getResources().getTextArray(
1397 com.android.internal.R.array.emailAddressTypes);
1398 try {
1399 display = labels[type - 1];
1400 } catch (ArrayIndexOutOfBoundsException e) {
1401 display = labels[ContactMethods.TYPE_HOME - 1];
1402 }
1403 } else {
1404 if (!TextUtils.isEmpty(label)) {
1405 display = label;
1406 }
1407 }
1408 break;
1409 }
1410
1411 case KIND_POSTAL: {
1412 if (type != People.ContactMethods.TYPE_CUSTOM) {
1413 CharSequence[] labels = context.getResources().getTextArray(
1414 com.android.internal.R.array.postalAddressTypes);
1415 try {
1416 display = labels[type - 1];
1417 } catch (ArrayIndexOutOfBoundsException e) {
1418 display = labels[ContactMethods.TYPE_HOME - 1];
1419 }
1420 } else {
1421 if (!TextUtils.isEmpty(label)) {
1422 display = label;
1423 }
1424 }
1425 break;
1426 }
1427
1428 default:
1429 display = context.getString(R.string.untitled);
1430 }
1431 return display;
1432 }
1433
1434 /**
1435 * Add a longitude and latitude location to a postal address.
1436 *
1437 * @param context the context to use when updating the database
1438 * @param postalId the address to update
1439 * @param latitude the latitude for the address
1440 * @param longitude the longitude for the address
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001441 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001442 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001443 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001444 public void addPostalLocation(Context context, long postalId,
1445 double latitude, double longitude) {
1446 final ContentResolver resolver = context.getContentResolver();
1447 // Insert the location
1448 ContentValues values = new ContentValues(2);
1449 values.put(POSTAL_LOCATION_LATITUDE, latitude);
1450 values.put(POSTAL_LOCATION_LONGITUDE, longitude);
1451 Uri loc = resolver.insert(CONTENT_URI, values);
1452 long locId = ContentUris.parseId(loc);
1453
1454 // Update the postal address
1455 values.clear();
1456 values.put(AUX_DATA, locId);
1457 resolver.update(ContentUris.withAppendedId(CONTENT_URI, postalId), values, null, null);
1458 }
1459
1460 /**
1461 * The content:// style URL for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001462 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001463 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001464 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001465 public static final Uri CONTENT_URI =
1466 Uri.parse("content://contacts/contact_methods");
1467
1468 /**
1469 * The content:// style URL for sub-directory of e-mail addresses.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001470 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001471 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001472 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001473 public static final Uri CONTENT_EMAIL_URI =
1474 Uri.parse("content://contacts/contact_methods/email");
1475
1476 /**
1477 * The MIME type of {@link #CONTENT_URI} providing a directory of
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001478 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001479 * phones.
1480 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001481 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001482 public static final String CONTENT_TYPE = "vnd.android.cursor.dir/contact-methods";
1483
1484 /**
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001485 * The MIME type of a {@link #CONTENT_EMAIL_URI} sub-directory of
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001486 * multiple {@link Contacts#KIND_EMAIL} entries.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001487 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001488 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001489 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001490 public static final String CONTENT_EMAIL_TYPE = "vnd.android.cursor.dir/email";
1491
1492 /**
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001493 * The MIME type of a {@link #CONTENT_EMAIL_URI} sub-directory of
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001494 * multiple {@link Contacts#KIND_POSTAL} entries.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001495 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001496 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001497 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001498 public static final String CONTENT_POSTAL_TYPE = "vnd.android.cursor.dir/postal-address";
1499
1500 /**
1501 * The MIME type of a {@link #CONTENT_URI} sub-directory of a single
1502 * {@link Contacts#KIND_EMAIL} entry.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001503 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001504 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001505 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001506 public static final String CONTENT_EMAIL_ITEM_TYPE = "vnd.android.cursor.item/email";
1507
1508 /**
1509 * The MIME type of a {@link #CONTENT_URI} sub-directory of a single
1510 * {@link Contacts#KIND_POSTAL} entry.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001511 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001512 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001513 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001514 public static final String CONTENT_POSTAL_ITEM_TYPE
1515 = "vnd.android.cursor.item/postal-address";
1516
1517 /**
1518 * The MIME type of a {@link #CONTENT_URI} sub-directory of a single
1519 * {@link Contacts#KIND_IM} entry.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001520 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001521 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001522 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001523 public static final String CONTENT_IM_ITEM_TYPE = "vnd.android.cursor.item/jabber-im";
1524
1525 /**
1526 * The default sort order for this table
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 DEFAULT_SORT_ORDER = "name ASC";
1531
1532 /**
1533 * The ID of the person this contact method is assigned to.
1534 * <P>Type: INTEGER (long)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001535 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001536 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001537 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001538 public static final String PERSON_ID = "person";
1539 }
1540
1541 /**
1542 * The IM presence columns with some contacts specific columns mixed in.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001543 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001544 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001545 @Deprecated
Jeff Hamiltonf3960b12009-11-20 20:04:03 -08001546 public interface PresenceColumns {
1547 /**
1548 * The priority, an integer, used by XMPP presence
1549 * <P>Type: INTEGER</P>
1550 */
1551 String PRIORITY = "priority";
1552
1553 /**
1554 * The server defined status.
1555 * <P>Type: INTEGER (one of the values below)</P>
1556 */
1557 String PRESENCE_STATUS = ContactsContract.StatusUpdates.PRESENCE;
1558
1559 /**
1560 * Presence Status definition
1561 */
1562 int OFFLINE = ContactsContract.StatusUpdates.OFFLINE;
1563 int INVISIBLE = ContactsContract.StatusUpdates.INVISIBLE;
1564 int AWAY = ContactsContract.StatusUpdates.AWAY;
1565 int IDLE = ContactsContract.StatusUpdates.IDLE;
1566 int DO_NOT_DISTURB = ContactsContract.StatusUpdates.DO_NOT_DISTURB;
1567 int AVAILABLE = ContactsContract.StatusUpdates.AVAILABLE;
1568
1569 /**
1570 * The user defined status line.
1571 * <P>Type: TEXT</P>
1572 */
1573 String PRESENCE_CUSTOM_STATUS = ContactsContract.StatusUpdates.STATUS;
1574
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001575 /**
1576 * The IM service the presence is coming from. Formatted using either
1577 * {@link Contacts.ContactMethods#encodePredefinedImProtocol} or
1578 * {@link Contacts.ContactMethods#encodeCustomImProtocol}.
1579 * <P>Type: STRING</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001580 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001581 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001582 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001583 public static final String IM_PROTOCOL = "im_protocol";
1584
1585 /**
1586 * The IM handle the presence item is for. The handle is scoped to
1587 * the {@link #IM_PROTOCOL}.
1588 * <P>Type: STRING</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001589 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001590 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001591 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001592 public static final String IM_HANDLE = "im_handle";
1593
1594 /**
1595 * The IM account for the local user that the presence data came from.
1596 * <P>Type: STRING</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001597 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001598 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001599 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001600 public static final String IM_ACCOUNT = "im_account";
1601 }
1602
1603 /**
1604 * Contains presence information about contacts.
1605 * @hide
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001606 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001607 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001608 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001609 public static final class Presence
1610 implements BaseColumns, PresenceColumns, PeopleColumns {
1611 /**
1612 * The content:// style URL for this table
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 Uri CONTENT_URI =
1617 Uri.parse("content://contacts/presence");
1618
1619 /**
1620 * The ID of the person this presence item is assigned to.
1621 * <P>Type: INTEGER (long)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001622 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001623 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001624 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001625 public static final String PERSON_ID = "person";
1626
1627 /**
1628 * Gets the resource ID for the proper presence icon.
Evan Millardc2da5f2009-06-18 16:07:13 -07001629 *
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001630 * @param status the status to get the icon for
1631 * @return the resource ID for the proper presence icon
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001632 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001633 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001634 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001635 public static final int getPresenceIconResourceId(int status) {
1636 switch (status) {
1637 case Contacts.People.AVAILABLE:
1638 return com.android.internal.R.drawable.presence_online;
Evan Millardc2da5f2009-06-18 16:07:13 -07001639
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001640 case Contacts.People.IDLE:
1641 case Contacts.People.AWAY:
1642 return com.android.internal.R.drawable.presence_away;
Evan Millardc2da5f2009-06-18 16:07:13 -07001643
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001644 case Contacts.People.DO_NOT_DISTURB:
1645 return com.android.internal.R.drawable.presence_busy;
Evan Millardc2da5f2009-06-18 16:07:13 -07001646
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001647 case Contacts.People.INVISIBLE:
1648 return com.android.internal.R.drawable.presence_invisible;
Evan Millardc2da5f2009-06-18 16:07:13 -07001649
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001650 case Contacts.People.OFFLINE:
1651 default:
1652 return com.android.internal.R.drawable.presence_offline;
1653 }
1654 }
1655
1656 /**
1657 * Sets a presence icon to the proper graphic
1658 *
1659 * @param icon the icon to to set
1660 * @param serverStatus that status
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001661 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001662 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001663 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001664 public static final void setPresenceIcon(ImageView icon, int serverStatus) {
1665 icon.setImageResource(getPresenceIconResourceId(serverStatus));
1666 }
1667 }
1668
1669 /**
1670 * Columns from the Organizations table that other columns join into themselves.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001671 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001672 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001673 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001674 public interface OrganizationColumns {
1675 /**
Evan JIANGae499952008-11-02 09:47:52 +08001676 * The type of the organizations.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001677 * <P>Type: INTEGER (one of the constants below)</P>
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 static final String TYPE = "type";
1682
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001683 /**
1684 * @deprecated see {@link android.provider.ContactsContract}
1685 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001686 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001687 public static final int TYPE_CUSTOM = 0;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001688 /**
1689 * @deprecated see {@link android.provider.ContactsContract}
1690 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001691 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001692 public static final int TYPE_WORK = 1;
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001693 /**
1694 * @deprecated see {@link android.provider.ContactsContract}
1695 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001696 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001697 public static final int TYPE_OTHER = 2;
1698
1699 /**
1700 * The user provided label, only used if TYPE is TYPE_CUSTOM.
1701 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001702 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001703 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001704 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001705 public static final String LABEL = "label";
1706
1707 /**
1708 * The name of the company for this organization.
1709 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001710 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001711 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001712 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001713 public static final String COMPANY = "company";
1714
1715 /**
1716 * The title within this organization.
1717 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001718 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001719 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001720 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001721 public static final String TITLE = "title";
1722
1723 /**
1724 * The person this organization is tied to.
1725 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001726 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001727 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001728 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001729 public static final String PERSON_ID = "person";
1730
1731 /**
1732 * Whether this is the primary organization
1733 * <P>Type: INTEGER (if set, non-0 means true)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001734 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001735 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001736 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001737 public static final String ISPRIMARY = "isprimary";
1738 }
1739
1740 /**
1741 * A sub directory of a single person that contains all of their Phones.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001742 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001743 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001744 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001745 public static final class Organizations implements BaseColumns, OrganizationColumns {
1746 /**
1747 * no public constructor since this is a utility class
1748 */
1749 private Organizations() {}
1750
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001751 /**
1752 * @deprecated see {@link android.provider.ContactsContract}
1753 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001754 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001755 public static final CharSequence getDisplayLabel(Context context, int type,
1756 CharSequence label) {
1757 CharSequence display = "";
1758
1759 if (type != TYPE_CUSTOM) {
1760 CharSequence[] labels = context.getResources().getTextArray(
1761 com.android.internal.R.array.organizationTypes);
1762 try {
1763 display = labels[type - 1];
1764 } catch (ArrayIndexOutOfBoundsException e) {
Evan JIANGae499952008-11-02 09:47:52 +08001765 display = labels[Organizations.TYPE_WORK - 1];
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001766 }
1767 } else {
1768 if (!TextUtils.isEmpty(label)) {
1769 display = label;
1770 }
1771 }
1772 return display;
1773 }
1774
1775 /**
1776 * The content:// style URL for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001777 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001778 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001779 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001780 public static final Uri CONTENT_URI =
1781 Uri.parse("content://contacts/organizations");
1782
1783 /**
1784 * The directory twig for this sub-table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001785 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001786 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001787 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001788 public static final String CONTENT_DIRECTORY = "organizations";
1789
1790 /**
1791 * The default sort order for this 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 DEFAULT_SORT_ORDER = "company, title, isprimary ASC";
1796 }
1797
1798 /**
1799 * Columns from the Photos table that other columns join into themselves.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001800 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001801 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001802 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001803 public interface PhotosColumns {
1804 /**
1805 * The _SYNC_VERSION of the photo that was last downloaded
1806 * <P>Type: TEXT</P>
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 static final String LOCAL_VERSION = "local_version";
1811
1812 /**
1813 * The person this photo is associated with.
1814 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001815 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001816 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001817 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001818 public static final String PERSON_ID = "person";
1819
1820 /**
1821 * non-zero if a download is required and the photo isn't marked as a bad resource.
1822 * You must specify this in the columns in order to use it in the where clause.
1823 * <P>Type: INTEGER(boolean)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001824 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001825 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001826 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001827 public static final String DOWNLOAD_REQUIRED = "download_required";
1828
1829 /**
1830 * non-zero if this photo is known to exist on the server
1831 * <P>Type: INTEGER(boolean)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001832 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001833 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001834 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001835 public static final String EXISTS_ON_SERVER = "exists_on_server";
1836
1837 /**
1838 * Contains the description of the upload or download error from
1839 * the previous attempt. If null then the previous attempt succeeded.
1840 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001841 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001842 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001843 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001844 public static final String SYNC_ERROR = "sync_error";
1845
1846 /**
1847 * The image data, or null if there is no image.
1848 * <P>Type: BLOB</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001849 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001850 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001851 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001852 public static final String DATA = "data";
1853
1854 }
1855
1856 /**
1857 * The photos over all of the people
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001858 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001859 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001860 @Deprecated
Yorke Lee1ca440b2014-06-04 18:01:46 -07001861 public static final class Photos implements BaseColumns, PhotosColumns {
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001862 /**
1863 * no public constructor since this is a utility class
1864 */
1865 private Photos() {}
1866
1867 /**
1868 * The content:// style URL for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001869 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001870 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001871 @Deprecated
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001872 public static final Uri CONTENT_URI = Uri.parse("content://contacts/photos");
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001873
1874 /**
1875 * The directory twig for this sub-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
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001879 public static final String CONTENT_DIRECTORY = "photo";
1880
1881 /**
1882 * The default sort order for this 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 DEFAULT_SORT_ORDER = "person ASC";
1887 }
1888
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001889 /**
1890 * @deprecated see {@link android.provider.ContactsContract}
1891 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001892 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001893 public interface ExtensionsColumns {
1894 /**
1895 * The name of this extension. May not be null. There may be at most one row for each name.
1896 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001897 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001898 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001899 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001900 public static final String NAME = "name";
1901
1902 /**
1903 * The value of this extension. May not be null.
1904 * <P>Type: TEXT</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001905 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001906 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001907 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001908 public static final String VALUE = "value";
1909 }
1910
1911 /**
1912 * The extensions for a person
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001913 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001914 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001915 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001916 public static final class Extensions implements BaseColumns, ExtensionsColumns {
1917 /**
1918 * no public constructor since this is a utility class
1919 */
1920 private Extensions() {}
1921
1922 /**
1923 * The content:// style URL for this table
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001924 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001925 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001926 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001927 public static final Uri CONTENT_URI =
1928 Uri.parse("content://contacts/extensions");
1929
1930 /**
1931 * The MIME type of {@link #CONTENT_URI} providing a directory of
1932 * phones.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001933 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001934 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001935 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001936 public static final String CONTENT_TYPE = "vnd.android.cursor.dir/contact_extensions";
1937
1938 /**
1939 * The MIME type of a {@link #CONTENT_URI} subdirectory of a single
1940 * phone.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001941 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001942 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001943 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001944 public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/contact_extensions";
Jeff Sharkey534aa012009-08-25 14:33:44 -07001945
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001946 /**
1947 * The default sort order for this table
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 DEFAULT_SORT_ORDER = "person, name ASC";
1952
1953 /**
1954 * The ID of the person this phone number is assigned to.
1955 * <P>Type: INTEGER (long)</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001956 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001957 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001958 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001959 public static final String PERSON_ID = "person";
1960 }
1961
1962 /**
1963 * Contains helper classes used to create or manage {@link android.content.Intent Intents}
1964 * that involve contacts.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001965 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001966 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001967 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001968 public static final class Intents {
Dianne Hackborn29e4a3c2009-09-30 22:35:40 -07001969 /**
1970 * @deprecated see {@link android.provider.ContactsContract}
1971 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001972 @Deprecated
1973 public Intents() {
1974 }
1975
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001976 /**
1977 * This is the intent that is fired when a search suggestion is clicked on.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001978 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001979 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001980 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001981 public static final String SEARCH_SUGGESTION_CLICKED =
Evan Millardc2da5f2009-06-18 16:07:13 -07001982 ContactsContract.Intents.SEARCH_SUGGESTION_CLICKED;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001983
1984 /**
Evan Millardc2da5f2009-06-18 16:07:13 -07001985 * 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 -07001986 * is clicked on.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001987 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001988 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001989 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001990 public static final String SEARCH_SUGGESTION_DIAL_NUMBER_CLICKED =
Evan Millardc2da5f2009-06-18 16:07:13 -07001991 ContactsContract.Intents.SEARCH_SUGGESTION_DIAL_NUMBER_CLICKED;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001992
1993 /**
1994 * This is the intent that is fired when a search suggestion for creating a contact
1995 * is clicked on.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05001996 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001997 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07001998 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07001999 public static final String SEARCH_SUGGESTION_CREATE_CONTACT_CLICKED =
Evan Millardc2da5f2009-06-18 16:07:13 -07002000 ContactsContract.Intents.SEARCH_SUGGESTION_CREATE_CONTACT_CLICKED;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002001
2002 /**
2003 * Starts an Activity that lets the user pick a contact to attach an image to.
2004 * After picking the contact it launches the image cropper in face detection mode.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002005 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002006 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002007 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002008 public static final String ATTACH_IMAGE = ContactsContract.Intents.ATTACH_IMAGE;
The Android Open Source Projectc39a6e02009-03-11 12:11:56 -07002009
2010 /**
2011 * Takes as input a data URI with a mailto: or tel: scheme. If a single
2012 * contact exists with the given data it will be shown. If no contact
2013 * exists, a dialog will ask the user if they want to create a new
2014 * contact with the provided details filled in. If multiple contacts
2015 * share the data the user will be prompted to pick which contact they
2016 * want to view.
2017 * <p>
2018 * For <code>mailto:</code> URIs, the scheme specific portion must be a
2019 * raw email address, such as one built using
2020 * {@link Uri#fromParts(String, String, String)}.
2021 * <p>
2022 * For <code>tel:</code> URIs, the scheme specific portion is compared
2023 * to existing numbers using the standard caller ID lookup algorithm.
2024 * The number must be properly encoded, for example using
2025 * {@link Uri#fromParts(String, String, String)}.
2026 * <p>
2027 * Any extras from the {@link Insert} class will be passed along to the
2028 * create activity if there are no contacts to show.
2029 * <p>
2030 * Passing true for the {@link #EXTRA_FORCE_CREATE} extra will skip
2031 * prompting the user when the contact doesn't exist.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002032 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectc39a6e02009-03-11 12:11:56 -07002033 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002034 @Deprecated
The Android Open Source Projectc39a6e02009-03-11 12:11:56 -07002035 public static final String SHOW_OR_CREATE_CONTACT =
Evan Millardc2da5f2009-06-18 16:07:13 -07002036 ContactsContract.Intents.SHOW_OR_CREATE_CONTACT;
The Android Open Source Projectc39a6e02009-03-11 12:11:56 -07002037
2038 /**
The Android Open Source Project10592532009-03-18 17:39:46 -07002039 * Used with {@link #SHOW_OR_CREATE_CONTACT} to force creating a new
2040 * contact if no matching contact found. Otherwise, default behavior is
2041 * to prompt user with dialog before creating.
2042 * <p>
2043 * Type: BOOLEAN
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002044 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectc39a6e02009-03-11 12:11:56 -07002045 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002046 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002047 public static final String EXTRA_FORCE_CREATE = ContactsContract.Intents.EXTRA_FORCE_CREATE;
2048
The Android Open Source Project10592532009-03-18 17:39:46 -07002049 /**
2050 * Used with {@link #SHOW_OR_CREATE_CONTACT} to specify an exact
2051 * description to be shown when prompting user about creating a new
2052 * contact.
2053 * <p>
2054 * Type: STRING
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002055 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project10592532009-03-18 17:39:46 -07002056 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002057 @Deprecated
The Android Open Source Project10592532009-03-18 17:39:46 -07002058 public static final String EXTRA_CREATE_DESCRIPTION =
Evan Millardc2da5f2009-06-18 16:07:13 -07002059 ContactsContract.Intents.EXTRA_CREATE_DESCRIPTION;
The Android Open Source Projectc39a6e02009-03-11 12:11:56 -07002060
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002061 /**
Jeff Sharkey11322002009-06-04 17:25:51 -07002062 * Optional extra used with {@link #SHOW_OR_CREATE_CONTACT} to specify a
2063 * dialog location using screen coordinates. When not specified, the
2064 * dialog will be centered.
2065 *
2066 * @hide pending API council review
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002067 * @deprecated see {@link android.provider.ContactsContract}
Jeff Sharkey11322002009-06-04 17:25:51 -07002068 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002069 @Deprecated
Jeff Sharkey11322002009-06-04 17:25:51 -07002070 public static final String EXTRA_TARGET_RECT = ContactsContract.Intents.EXTRA_TARGET_RECT;
2071
2072 /**
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002073 * Intents related to the Contacts app UI.
Brian Attwellcc4b2f72015-01-08 14:58:15 -08002074 * @deprecated Do not use. This is not supported.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002075 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002076 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002077 public static final class UI {
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002078 /**
Brian Attwellcc4b2f72015-01-08 14:58:15 -08002079 * @deprecated Do not use. This is not supported.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002080 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002081 @Deprecated
2082 public UI() {
2083 }
2084
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002085 /**
2086 * The action for the default contacts list tab.
Brian Attwellcc4b2f72015-01-08 14:58:15 -08002087 * @deprecated Do not use. This is not supported.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002088 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002089 @Deprecated
Brian Attwellcc4b2f72015-01-08 14:58:15 -08002090 public static final String LIST_DEFAULT
2091 = "com.android.contacts.action.LIST_DEFAULT";
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002092
2093 /**
2094 * The action for the contacts list tab.
Brian Attwellcc4b2f72015-01-08 14:58:15 -08002095 * @deprecated Do not use. This is not supported.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002096 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002097 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002098 public static final String LIST_GROUP_ACTION =
Brian Attwellcc4b2f72015-01-08 14:58:15 -08002099 "com.android.contacts.action.LIST_GROUP";
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002100
2101 /**
2102 * When in LIST_GROUP_ACTION mode, this is the group to display.
Brian Attwellcc4b2f72015-01-08 14:58:15 -08002103 * @deprecated Do not use. This is not supported.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002104 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002105 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002106 public static final String GROUP_NAME_EXTRA_KEY =
Brian Attwellcc4b2f72015-01-08 14:58:15 -08002107 "com.android.contacts.extra.GROUP";
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002108 /**
2109 * The action for the all contacts list tab.
Brian Attwellcc4b2f72015-01-08 14:58:15 -08002110 * @deprecated Do not use. This is not supported.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002111 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002112 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002113 public static final String LIST_ALL_CONTACTS_ACTION =
Brian Attwellcc4b2f72015-01-08 14:58:15 -08002114 "com.android.contacts.action.LIST_ALL_CONTACTS";
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002115
2116 /**
2117 * The action for the contacts with phone numbers list tab.
Brian Attwellcc4b2f72015-01-08 14:58:15 -08002118 * @deprecated Do not use. This is not supported.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002119 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002120 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002121 public static final String LIST_CONTACTS_WITH_PHONES_ACTION =
Brian Attwellcc4b2f72015-01-08 14:58:15 -08002122 "com.android.contacts.action.LIST_CONTACTS_WITH_PHONES";
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002123
2124 /**
2125 * The action for the starred contacts list tab.
Brian Attwellcc4b2f72015-01-08 14:58:15 -08002126 * @deprecated Do not use. This is not supported.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002127 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002128 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002129 public static final String LIST_STARRED_ACTION =
Brian Attwellcc4b2f72015-01-08 14:58:15 -08002130 "com.android.contacts.action.LIST_STARRED";
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002131
2132 /**
2133 * The action for the frequent contacts list tab.
Brian Attwellcc4b2f72015-01-08 14:58:15 -08002134 * @deprecated Do not use. This is not supported.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002135 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002136 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002137 public static final String LIST_FREQUENT_ACTION =
Brian Attwellcc4b2f72015-01-08 14:58:15 -08002138 "com.android.contacts.action.LIST_FREQUENT";
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002139
2140 /**
2141 * The action for the "strequent" contacts list tab. It first lists the starred
2142 * contacts in alphabetical order and then the frequent contacts in descending
2143 * order of the number of times they have been contacted.
Brian Attwellcc4b2f72015-01-08 14:58:15 -08002144 * @deprecated Do not use. This is not supported.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002145 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002146 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002147 public static final String LIST_STREQUENT_ACTION =
Brian Attwellcc4b2f72015-01-08 14:58:15 -08002148 "com.android.contacts.action.LIST_STREQUENT";
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002149
2150 /**
2151 * A key for to be used as an intent extra to set the activity
2152 * title to a custom String value.
Brian Attwellcc4b2f72015-01-08 14:58:15 -08002153 * @deprecated Do not use. This is not supported.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002154 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002155 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002156 public static final String TITLE_EXTRA_KEY =
Brian Attwellcc4b2f72015-01-08 14:58:15 -08002157 "com.android.contacts.extra.TITLE_EXTRA";
Evan Millardc2da5f2009-06-18 16:07:13 -07002158
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002159 /**
2160 * Activity Action: Display a filtered list of contacts
2161 * <p>
2162 * Input: Extra field {@link #FILTER_TEXT_EXTRA_KEY} is the text to use for
2163 * filtering
2164 * <p>
2165 * Output: Nothing.
Brian Attwellcc4b2f72015-01-08 14:58:15 -08002166 * @deprecated Do not use. This is not supported.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002167 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002168 @Deprecated
Jeff Sharkey0f3f60b2017-04-24 18:06:20 -06002169 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
Evan Millardc2da5f2009-06-18 16:07:13 -07002170 public static final String FILTER_CONTACTS_ACTION =
Brian Attwellcc4b2f72015-01-08 14:58:15 -08002171 "com.android.contacts.action.FILTER_CONTACTS";
Evan Millardc2da5f2009-06-18 16:07:13 -07002172
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002173 /**
2174 * Used as an int extra field in {@link #FILTER_CONTACTS_ACTION}
2175 * intents to supply the text on which to filter.
Brian Attwellcc4b2f72015-01-08 14:58:15 -08002176 * @deprecated Do not use. This is not supported.
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002177 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002178 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002179 public static final String FILTER_TEXT_EXTRA_KEY =
Brian Attwellcc4b2f72015-01-08 14:58:15 -08002180 "com.android.contacts.extra.FILTER_TEXT";
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002181 }
2182
2183 /**
2184 * Convenience class that contains string constants used
2185 * to create contact {@link android.content.Intent Intents}.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002186 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002187 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002188 @Deprecated
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002189 public static final class Insert {
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002190 /**
2191 * @deprecated see {@link android.provider.ContactsContract}
2192 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002193 @Deprecated
2194 public Insert() {
2195 }
2196
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002197 /** The action code to use when adding a contact
Yorke Lee1ca440b2014-06-04 18:01:46 -07002198 * @deprecated see {@link android.provider.ContactsContract}
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002199 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002200 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002201 public static final String ACTION = ContactsContract.Intents.Insert.ACTION;
Jeff Sharkey534aa012009-08-25 14:33:44 -07002202
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002203 /**
2204 * If present, forces a bypass of quick insert mode.
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002205 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002206 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002207 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002208 public static final String FULL_MODE = ContactsContract.Intents.Insert.FULL_MODE;
Jeff Sharkey534aa012009-08-25 14:33:44 -07002209
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002210 /**
2211 * The extra field for the contact name.
2212 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002213 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002214 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002215 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002216 public static final String NAME = ContactsContract.Intents.Insert.NAME;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002217
2218 /**
The Android Open Source Projectb7986892009-01-09 17:51:23 -08002219 * The extra field for the contact phonetic name.
2220 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002221 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectb7986892009-01-09 17:51:23 -08002222 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002223 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002224 public static final String PHONETIC_NAME =
2225 ContactsContract.Intents.Insert.PHONETIC_NAME;
The Android Open Source Projectb7986892009-01-09 17:51:23 -08002226
2227 /**
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002228 * The extra field for the contact company.
2229 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002230 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002231 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002232 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002233 public static final String COMPANY = ContactsContract.Intents.Insert.COMPANY;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002234
2235 /**
2236 * The extra field for the contact job title.
2237 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002238 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002239 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002240 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002241 public static final String JOB_TITLE = ContactsContract.Intents.Insert.JOB_TITLE;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002242
2243 /**
2244 * The extra field for the contact notes.
2245 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002246 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002247 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002248 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002249 public static final String NOTES = ContactsContract.Intents.Insert.NOTES;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002250
2251 /**
2252 * The extra field for the contact phone number.
2253 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002254 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002255 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002256 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002257 public static final String PHONE = ContactsContract.Intents.Insert.PHONE;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002258
2259 /**
2260 * The extra field for the contact phone number type.
2261 * <P>Type: Either an integer value from {@link android.provider.Contacts.PhonesColumns PhonesColumns},
The Android Open Source Projectb7986892009-01-09 17:51:23 -08002262 * or a string specifying a custom label.</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002263 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002264 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002265 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002266 public static final String PHONE_TYPE = ContactsContract.Intents.Insert.PHONE_TYPE;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002267
2268 /**
2269 * The extra field for the phone isprimary flag.
2270 * <P>Type: boolean</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002271 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002272 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002273 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002274 public static final String PHONE_ISPRIMARY =
2275 ContactsContract.Intents.Insert.PHONE_ISPRIMARY;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002276
2277 /**
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002278 * The extra field for an optional second contact phone number.
2279 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002280 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002281 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002282 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002283 public static final String SECONDARY_PHONE =
2284 ContactsContract.Intents.Insert.SECONDARY_PHONE;
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002285
2286 /**
2287 * The extra field for an optional second contact phone number type.
2288 * <P>Type: Either an integer value from {@link android.provider.Contacts.PhonesColumns PhonesColumns},
The Android Open Source Projectb7986892009-01-09 17:51:23 -08002289 * or a string specifying a custom label.</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002290 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002291 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002292 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002293 public static final String SECONDARY_PHONE_TYPE =
2294 ContactsContract.Intents.Insert.SECONDARY_PHONE_TYPE;
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002295
2296 /**
2297 * The extra field for an optional third contact phone number.
2298 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002299 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002300 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002301 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002302 public static final String TERTIARY_PHONE =
2303 ContactsContract.Intents.Insert.TERTIARY_PHONE;
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002304
2305 /**
2306 * The extra field for an optional third contact phone number type.
2307 * <P>Type: Either an integer value from {@link android.provider.Contacts.PhonesColumns PhonesColumns},
The Android Open Source Projectb7986892009-01-09 17:51:23 -08002308 * or a string specifying a custom label.</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002309 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002310 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002311 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002312 public static final String TERTIARY_PHONE_TYPE =
2313 ContactsContract.Intents.Insert.TERTIARY_PHONE_TYPE;
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002314
2315 /**
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002316 * The extra field for the contact email address.
2317 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002318 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002319 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002320 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002321 public static final String EMAIL = ContactsContract.Intents.Insert.EMAIL;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002322
2323 /**
2324 * The extra field for the contact email type.
2325 * <P>Type: Either an integer value from {@link android.provider.Contacts.ContactMethodsColumns ContactMethodsColumns}
The Android Open Source Projectb7986892009-01-09 17:51:23 -08002326 * or a string specifying a custom label.</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002327 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002328 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002329 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002330 public static final String EMAIL_TYPE = ContactsContract.Intents.Insert.EMAIL_TYPE;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002331
2332 /**
2333 * The extra field for the email isprimary flag.
2334 * <P>Type: boolean</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002335 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002336 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002337 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002338 public static final String EMAIL_ISPRIMARY =
2339 ContactsContract.Intents.Insert.EMAIL_ISPRIMARY;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002340
2341 /**
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002342 * The extra field for an optional second contact email address.
2343 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002344 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002345 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002346 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002347 public static final String SECONDARY_EMAIL =
2348 ContactsContract.Intents.Insert.SECONDARY_EMAIL;
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002349
2350 /**
2351 * The extra field for an optional second contact email type.
2352 * <P>Type: Either an integer value from {@link android.provider.Contacts.ContactMethodsColumns ContactMethodsColumns}
The Android Open Source Projectb7986892009-01-09 17:51:23 -08002353 * or a string specifying a custom label.</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002354 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002355 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002356 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002357 public static final String SECONDARY_EMAIL_TYPE =
2358 ContactsContract.Intents.Insert.SECONDARY_EMAIL_TYPE;
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002359
2360 /**
2361 * The extra field for an optional third contact email address.
2362 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002363 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002364 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002365 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002366 public static final String TERTIARY_EMAIL =
2367 ContactsContract.Intents.Insert.TERTIARY_EMAIL;
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002368
2369 /**
2370 * The extra field for an optional third contact email type.
2371 * <P>Type: Either an integer value from {@link android.provider.Contacts.ContactMethodsColumns ContactMethodsColumns}
The Android Open Source Projectb7986892009-01-09 17:51:23 -08002372 * or a string specifying a custom label.</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002373 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002374 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002375 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002376 public static final String TERTIARY_EMAIL_TYPE =
2377 ContactsContract.Intents.Insert.TERTIARY_EMAIL_TYPE;
The Android Open Source Projectf013e1a2008-12-17 18:05:43 -08002378
2379 /**
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002380 * The extra field for the contact postal address.
2381 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002382 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002383 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002384 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002385 public static final String POSTAL = ContactsContract.Intents.Insert.POSTAL;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002386
2387 /**
2388 * The extra field for the contact postal address type.
2389 * <P>Type: Either an integer value from {@link android.provider.Contacts.ContactMethodsColumns ContactMethodsColumns}
The Android Open Source Projectb7986892009-01-09 17:51:23 -08002390 * or a string specifying a custom label.</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002391 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002392 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002393 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002394 public static final String POSTAL_TYPE = ContactsContract.Intents.Insert.POSTAL_TYPE;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002395
2396 /**
2397 * The extra field for the postal isprimary flag.
2398 * <P>Type: boolean</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002399 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002400 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002401 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002402 public static final String POSTAL_ISPRIMARY = ContactsContract.Intents.Insert.POSTAL_ISPRIMARY;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002403
2404 /**
2405 * The extra field for an IM handle.
2406 * <P>Type: String</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002407 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002408 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002409 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002410 public static final String IM_HANDLE = ContactsContract.Intents.Insert.IM_HANDLE;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002411
2412 /**
2413 * The extra field for the IM protocol
2414 * <P>Type: the result of {@link Contacts.ContactMethods#encodePredefinedImProtocol}
2415 * or {@link Contacts.ContactMethods#encodeCustomImProtocol}.</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002416 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002417 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002418 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002419 public static final String IM_PROTOCOL = ContactsContract.Intents.Insert.IM_PROTOCOL;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002420
2421 /**
2422 * The extra field for the IM isprimary flag.
2423 * <P>Type: boolean</P>
Jeff Hamiltonf8526982009-09-24 11:34:58 -05002424 * @deprecated see {@link android.provider.ContactsContract}
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002425 */
Jeff Sharkey534aa012009-08-25 14:33:44 -07002426 @Deprecated
Evan Millardc2da5f2009-06-18 16:07:13 -07002427 public static final String IM_ISPRIMARY = ContactsContract.Intents.Insert.IM_ISPRIMARY;
The Android Open Source Project54b6cfa2008-10-21 07:00:00 -07002428 }
2429 }
2430}