The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1 | /* |
| 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 | |
| 17 | package android.provider; |
| 18 | |
The Android Open Source Project | f013e1a | 2008-12-17 18:05:43 -0800 | [diff] [blame] | 19 | import com.android.internal.R; |
| 20 | |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 21 | import android.content.ContentResolver; |
| 22 | import android.content.ContentUris; |
| 23 | import android.content.ContentValues; |
| 24 | import android.content.Context; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 25 | import android.database.Cursor; |
| 26 | import android.graphics.Bitmap; |
| 27 | import android.graphics.BitmapFactory; |
| 28 | import android.net.Uri; |
| 29 | import android.text.TextUtils; |
| 30 | import android.util.Log; |
| 31 | import android.widget.ImageView; |
| 32 | |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 33 | import java.io.ByteArrayInputStream; |
| 34 | import java.io.InputStream; |
| 35 | |
| 36 | /** |
| 37 | * The Contacts provider stores all information about contacts. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 38 | * |
| 39 | * @deprecated The APIs have been superseded by {@link ContactsContract}. The newer APIs allow |
| 40 | * access multiple accounts and support aggregation of similar contacts. These APIs continue to |
| 41 | * work but will only return data for the first Google account created, which matches the original |
| 42 | * behavior. |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 43 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 44 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 45 | public class Contacts { |
| 46 | private static final String TAG = "Contacts"; |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 47 | |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 48 | /** |
| 49 | * @deprecated see {@link android.provider.ContactsContract} |
| 50 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 51 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 52 | public static final String AUTHORITY = "contacts"; |
| 53 | |
| 54 | /** |
| 55 | * The content:// style URL for this provider |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 56 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 57 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 58 | @Deprecated |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 59 | public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY); |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 60 | |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 61 | /** |
| 62 | * Signifies an email address row that is stored in the ContactMethods table |
| 63 | * @deprecated see {@link android.provider.ContactsContract} |
| 64 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 65 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 66 | public static final int KIND_EMAIL = 1; |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 67 | /** |
| 68 | * Signifies a postal address row that is stored in the ContactMethods table |
| 69 | * @deprecated see {@link android.provider.ContactsContract} |
| 70 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 71 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 72 | public static final int KIND_POSTAL = 2; |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 73 | /** |
| 74 | * Signifies an IM address row that is stored in the ContactMethods table |
| 75 | * @deprecated see {@link android.provider.ContactsContract} |
| 76 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 77 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 78 | public static final int KIND_IM = 3; |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 79 | /** |
| 80 | * Signifies an Organization row that is stored in the Organizations table |
| 81 | * @deprecated see {@link android.provider.ContactsContract} |
| 82 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 83 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 84 | public static final int KIND_ORGANIZATION = 4; |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 85 | /** |
Ken Wakasa | f76a50c | 2012-03-09 19:56:35 +0900 | [diff] [blame] | 86 | * Signifies a Phone row that is stored in the Phones table |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 87 | * @deprecated see {@link android.provider.ContactsContract} |
| 88 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 89 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 90 | public static final int KIND_PHONE = 5; |
| 91 | |
| 92 | /** |
| 93 | * no public constructor since this is a utility class |
| 94 | */ |
| 95 | private Contacts() {} |
| 96 | |
| 97 | /** |
| 98 | * Columns from the Settings table that other columns join into themselves. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 99 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 100 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 101 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 102 | public interface SettingsColumns { |
| 103 | /** |
| 104 | * The _SYNC_ACCOUNT to which this setting corresponds. This may be null. |
| 105 | * <P>Type: TEXT</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 106 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 107 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 108 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 109 | public static final String _SYNC_ACCOUNT = "_sync_account"; |
| 110 | |
| 111 | /** |
Fred Quintana | d9d2f11 | 2009-04-23 13:36:27 -0700 | [diff] [blame] | 112 | * The _SYNC_ACCOUNT_TYPE to which this setting corresponds. This may be null. |
| 113 | * <P>Type: TEXT</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 114 | * @deprecated see {@link android.provider.ContactsContract} |
Fred Quintana | d9d2f11 | 2009-04-23 13:36:27 -0700 | [diff] [blame] | 115 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 116 | @Deprecated |
Fred Quintana | d9d2f11 | 2009-04-23 13:36:27 -0700 | [diff] [blame] | 117 | public static final String _SYNC_ACCOUNT_TYPE = "_sync_account_type"; |
| 118 | |
| 119 | /** |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 120 | * The key of this setting. |
| 121 | * <P>Type: TEXT</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 122 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 123 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 124 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 125 | public static final String KEY = "key"; |
| 126 | |
| 127 | /** |
| 128 | * The value of this setting. |
| 129 | * <P>Type: TEXT</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 130 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 131 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 132 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 133 | public static final String VALUE = "value"; |
| 134 | } |
| 135 | |
| 136 | /** |
| 137 | * The settings over all of the people |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 138 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 139 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 140 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 141 | public static final class Settings implements BaseColumns, SettingsColumns { |
| 142 | /** |
| 143 | * no public constructor since this is a utility class |
| 144 | */ |
| 145 | private Settings() {} |
| 146 | |
| 147 | /** |
| 148 | * The content:// style URL for this table |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 149 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 150 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 151 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 152 | public static final Uri CONTENT_URI = |
| 153 | Uri.parse("content://contacts/settings"); |
| 154 | |
| 155 | /** |
| 156 | * The directory twig for this sub-table |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 157 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 158 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 159 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 160 | public static final String CONTENT_DIRECTORY = "settings"; |
| 161 | |
| 162 | /** |
| 163 | * The default sort order for this table |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 164 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 165 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 166 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 167 | public static final String DEFAULT_SORT_ORDER = "key ASC"; |
| 168 | |
| 169 | /** |
| 170 | * A setting that is used to indicate if we should sync down all groups for the |
| 171 | * specified account. For this setting the _SYNC_ACCOUNT column must be set. |
| 172 | * If this isn't set then we will only sync the groups whose SHOULD_SYNC column |
| 173 | * is set to true. |
| 174 | * <p> |
| 175 | * This is a boolean setting. It is true if it is set and it is anything other than the |
| 176 | * emptry string or "0". |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 177 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 178 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 179 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 180 | public static final String SYNC_EVERYTHING = "syncEverything"; |
| 181 | |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 182 | /** |
| 183 | * @deprecated see {@link android.provider.ContactsContract} |
| 184 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 185 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 186 | public static String getSetting(ContentResolver cr, String account, String key) { |
| 187 | // For now we only support a single account and the UI doesn't know what |
| 188 | // the account name is, so we're using a global setting for SYNC_EVERYTHING. |
| 189 | // Some day when we add multiple accounts to the UI this should honor the account |
| 190 | // that was asked for. |
| 191 | String selectString; |
| 192 | String[] selectArgs; |
| 193 | if (false) { |
| 194 | selectString = (account == null) |
| 195 | ? "_sync_account is null AND key=?" |
| 196 | : "_sync_account=? AND key=?"; |
Fred Quintana | d9d2f11 | 2009-04-23 13:36:27 -0700 | [diff] [blame] | 197 | // : "_sync_account=? AND _sync_account_type=? AND key=?"; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 198 | selectArgs = (account == null) |
| 199 | ? new String[]{key} |
| 200 | : new String[]{account, key}; |
| 201 | } else { |
| 202 | selectString = "key=?"; |
| 203 | selectArgs = new String[] {key}; |
| 204 | } |
| 205 | Cursor cursor = cr.query(Settings.CONTENT_URI, new String[]{VALUE}, |
| 206 | selectString, selectArgs, null); |
| 207 | try { |
| 208 | if (!cursor.moveToNext()) return null; |
| 209 | return cursor.getString(0); |
| 210 | } finally { |
| 211 | cursor.close(); |
| 212 | } |
| 213 | } |
| 214 | |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 215 | /** |
| 216 | * @deprecated see {@link android.provider.ContactsContract} |
| 217 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 218 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 219 | public static void setSetting(ContentResolver cr, String account, String key, |
| 220 | String value) { |
| 221 | ContentValues values = new ContentValues(); |
| 222 | // For now we only support a single account and the UI doesn't know what |
| 223 | // the account name is, so we're using a global setting for SYNC_EVERYTHING. |
| 224 | // Some day when we add multiple accounts to the UI this should honor the account |
| 225 | // that was asked for. |
Fred Quintana | d9d2f11 | 2009-04-23 13:36:27 -0700 | [diff] [blame] | 226 | //values.put(_SYNC_ACCOUNT, account.mName); |
| 227 | //values.put(_SYNC_ACCOUNT_TYPE, account.mType); |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 228 | values.put(KEY, key); |
| 229 | values.put(VALUE, value); |
| 230 | cr.update(Settings.CONTENT_URI, values, null, null); |
| 231 | } |
| 232 | } |
| 233 | |
| 234 | /** |
| 235 | * Columns from the People table that other tables join into themselves. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 236 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 237 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 238 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 239 | public interface PeopleColumns { |
| 240 | /** |
The Android Open Source Project | b798689 | 2009-01-09 17:51:23 -0800 | [diff] [blame] | 241 | * The person's name. |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 242 | * <P>Type: TEXT</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 243 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 244 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 245 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 246 | public static final String NAME = "name"; |
| 247 | |
| 248 | /** |
The Android Open Source Project | b798689 | 2009-01-09 17:51:23 -0800 | [diff] [blame] | 249 | * Phonetic equivalent of the person's name, in a locale-dependent |
| 250 | * character set (e.g. hiragana for Japanese). |
| 251 | * Used for pronunciation and/or collation in some languages. |
| 252 | * <p>Type: TEXT</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 253 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | b798689 | 2009-01-09 17:51:23 -0800 | [diff] [blame] | 254 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 255 | @Deprecated |
The Android Open Source Project | b798689 | 2009-01-09 17:51:23 -0800 | [diff] [blame] | 256 | public static final String PHONETIC_NAME = "phonetic_name"; |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 257 | |
The Android Open Source Project | b798689 | 2009-01-09 17:51:23 -0800 | [diff] [blame] | 258 | /** |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 259 | * The display name. If name is not null name, else if number is not null number, |
| 260 | * else if email is not null email. |
| 261 | * <P>Type: TEXT</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 262 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 263 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 264 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 265 | public static final String DISPLAY_NAME = "display_name"; |
| 266 | |
| 267 | /** |
The Android Open Source Project | ba87e3e | 2009-03-13 13:04:22 -0700 | [diff] [blame] | 268 | * The field for sorting list phonetically. The content of this field |
| 269 | * may not be human readable but phonetically sortable. |
| 270 | * <P>Type: TEXT</p> |
| 271 | * @hide Used only in Contacts application for now. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 272 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | ba87e3e | 2009-03-13 13:04:22 -0700 | [diff] [blame] | 273 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 274 | @Deprecated |
The Android Open Source Project | ba87e3e | 2009-03-13 13:04:22 -0700 | [diff] [blame] | 275 | public static final String SORT_STRING = "sort_string"; |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 276 | |
The Android Open Source Project | ba87e3e | 2009-03-13 13:04:22 -0700 | [diff] [blame] | 277 | /** |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 278 | * Notes about the person. |
| 279 | * <P>Type: TEXT</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 280 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 281 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 282 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 283 | public static final String NOTES = "notes"; |
| 284 | |
| 285 | /** |
| 286 | * The number of times a person has been contacted |
| 287 | * <P>Type: INTEGER</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 288 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 289 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 290 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 291 | public static final String TIMES_CONTACTED = "times_contacted"; |
| 292 | |
| 293 | /** |
| 294 | * The last time a person was contacted. |
| 295 | * <P>Type: INTEGER</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 296 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 297 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 298 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 299 | public static final String LAST_TIME_CONTACTED = "last_time_contacted"; |
| 300 | |
| 301 | /** |
| 302 | * A custom ringtone associated with a person. Not always present. |
| 303 | * <P>Type: TEXT (URI to the ringtone)</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 304 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 305 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 306 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 307 | public static final String CUSTOM_RINGTONE = "custom_ringtone"; |
| 308 | |
| 309 | /** |
| 310 | * Whether the person should always be sent to voicemail. Not always |
| 311 | * present. |
| 312 | * <P>Type: INTEGER (0 for false, 1 for true)</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 313 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 314 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 315 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 316 | public static final String SEND_TO_VOICEMAIL = "send_to_voicemail"; |
| 317 | |
| 318 | /** |
| 319 | * Is the contact starred? |
| 320 | * <P>Type: INTEGER (boolean)</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 321 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 322 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 323 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 324 | public static final String STARRED = "starred"; |
| 325 | |
| 326 | /** |
| 327 | * The server version of the photo |
| 328 | * <P>Type: TEXT (the version number portion of the photo URI)</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 329 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 330 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 331 | @Deprecated |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 332 | public static final String PHOTO_VERSION = "photo_version"; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 333 | } |
| 334 | |
| 335 | /** |
| 336 | * This table contains people. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 337 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 338 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 339 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 340 | public static final class People implements BaseColumns, SyncConstValue, PeopleColumns, |
| 341 | PhonesColumns, PresenceColumns { |
| 342 | /** |
| 343 | * no public constructor since this is a utility class |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 344 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 345 | */ |
| 346 | private People() {} |
| 347 | |
| 348 | /** |
| 349 | * The content:// style URL for this table |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 350 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 351 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 352 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 353 | public static final Uri CONTENT_URI = |
| 354 | Uri.parse("content://contacts/people"); |
| 355 | |
| 356 | /** |
| 357 | * The content:// style URL for filtering people by name. The filter |
| 358 | * argument should be passed as an additional path segment after this URI. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 359 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 360 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 361 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 362 | public static final Uri CONTENT_FILTER_URI = |
| 363 | Uri.parse("content://contacts/people/filter"); |
| 364 | |
| 365 | /** |
| 366 | * The content:// style URL for the table that holds the deleted |
| 367 | * contacts. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 368 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 369 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 370 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 371 | public static final Uri DELETED_CONTENT_URI = |
| 372 | Uri.parse("content://contacts/deleted_people"); |
| 373 | |
| 374 | /** |
Jeffrey Sharkey | 5104518 | 2009-03-25 21:37:10 -0700 | [diff] [blame] | 375 | * The content:// style URL for filtering people that have a specific |
| 376 | * E-mail or IM address. The filter argument should be passed as an |
| 377 | * additional path segment after this URI. This matches any people with |
| 378 | * at least one E-mail or IM {@link ContactMethods} that match the |
| 379 | * filter. |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 380 | * |
Dianne Hackborn | 935ae46 | 2009-04-13 16:11:55 -0700 | [diff] [blame] | 381 | * Not exposed because we expect significant changes in the contacts |
| 382 | * schema and do not want to have to support this. |
| 383 | * @hide |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 384 | * @deprecated see {@link android.provider.ContactsContract} |
Jeffrey Sharkey | 5104518 | 2009-03-25 21:37:10 -0700 | [diff] [blame] | 385 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 386 | @Deprecated |
Jeffrey Sharkey | 5104518 | 2009-03-25 21:37:10 -0700 | [diff] [blame] | 387 | public static final Uri WITH_EMAIL_OR_IM_FILTER_URI = |
| 388 | Uri.parse("content://contacts/people/with_email_or_im_filter"); |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 389 | |
Jeffrey Sharkey | 5104518 | 2009-03-25 21:37:10 -0700 | [diff] [blame] | 390 | /** |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 391 | * The MIME type of {@link #CONTENT_URI} providing a directory of |
| 392 | * people. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 393 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 394 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 395 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 396 | public static final String CONTENT_TYPE = "vnd.android.cursor.dir/person"; |
| 397 | |
| 398 | /** |
| 399 | * The MIME type of a {@link #CONTENT_URI} subdirectory of a single |
| 400 | * person. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 401 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 402 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 403 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 404 | public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/person"; |
| 405 | |
| 406 | /** |
| 407 | * The default sort order for this table |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 408 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 409 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 410 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 411 | public static final String DEFAULT_SORT_ORDER = People.NAME + " ASC"; |
| 412 | |
| 413 | /** |
| 414 | * The ID of the persons preferred phone number. |
| 415 | * <P>Type: INTEGER (foreign key to phones table on the _ID field)</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 416 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 417 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 418 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 419 | public static final String PRIMARY_PHONE_ID = "primary_phone"; |
| 420 | |
| 421 | /** |
| 422 | * The ID of the persons preferred email. |
| 423 | * <P>Type: INTEGER (foreign key to contact_methods table on the |
| 424 | * _ID field)</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 425 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 426 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 427 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 428 | public static final String PRIMARY_EMAIL_ID = "primary_email"; |
| 429 | |
| 430 | /** |
| 431 | * The ID of the persons preferred organization. |
| 432 | * <P>Type: INTEGER (foreign key to organizations table on the |
| 433 | * _ID field)</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 434 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 435 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 436 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 437 | public static final String PRIMARY_ORGANIZATION_ID = "primary_organization"; |
| 438 | |
| 439 | /** |
| 440 | * Mark a person as having been contacted. |
| 441 | * |
| 442 | * @param resolver the ContentResolver to use |
| 443 | * @param personId the person who was contacted |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 444 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 445 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 446 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 447 | public static void markAsContacted(ContentResolver resolver, long personId) { |
| 448 | Uri uri = ContentUris.withAppendedId(CONTENT_URI, personId); |
| 449 | uri = Uri.withAppendedPath(uri, "update_contact_time"); |
| 450 | ContentValues values = new ContentValues(); |
| 451 | // There is a trigger in place that will update TIMES_CONTACTED when |
| 452 | // LAST_TIME_CONTACTED is modified. |
| 453 | values.put(LAST_TIME_CONTACTED, System.currentTimeMillis()); |
| 454 | resolver.update(uri, values, null, null); |
| 455 | } |
| 456 | |
| 457 | /** |
Daisuke Miyakawa | 6e9610e | 2009-05-19 08:51:39 +0900 | [diff] [blame] | 458 | * @hide Used in vCard parser code. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 459 | * @deprecated see {@link android.provider.ContactsContract} |
Daisuke Miyakawa | 6e9610e | 2009-05-19 08:51:39 +0900 | [diff] [blame] | 460 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 461 | @Deprecated |
Daisuke Miyakawa | 6e9610e | 2009-05-19 08:51:39 +0900 | [diff] [blame] | 462 | public static long tryGetMyContactsGroupId(ContentResolver resolver) { |
| 463 | Cursor groupsCursor = resolver.query(Groups.CONTENT_URI, GROUPS_PROJECTION, |
| 464 | Groups.SYSTEM_ID + "='" + Groups.GROUP_MY_CONTACTS + "'", null, null); |
| 465 | if (groupsCursor != null) { |
| 466 | try { |
| 467 | if (groupsCursor.moveToFirst()) { |
| 468 | return groupsCursor.getLong(0); |
| 469 | } |
| 470 | } finally { |
| 471 | groupsCursor.close(); |
| 472 | } |
| 473 | } |
| 474 | return 0; |
| 475 | } |
| 476 | |
| 477 | /** |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 478 | * Adds a person to the My Contacts group. |
Daisuke Miyakawa | 6e9610e | 2009-05-19 08:51:39 +0900 | [diff] [blame] | 479 | * |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 480 | * @param resolver the resolver to use |
| 481 | * @param personId the person to add to the group |
| 482 | * @return the URI of the group membership row |
| 483 | * @throws IllegalStateException if the My Contacts group can't be found |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 484 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 485 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 486 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 487 | public static Uri addToMyContactsGroup(ContentResolver resolver, long personId) { |
Daisuke Miyakawa | 6e9610e | 2009-05-19 08:51:39 +0900 | [diff] [blame] | 488 | long groupId = tryGetMyContactsGroupId(resolver); |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 489 | if (groupId == 0) { |
| 490 | throw new IllegalStateException("Failed to find the My Contacts group"); |
| 491 | } |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 492 | |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 493 | return addToGroup(resolver, personId, groupId); |
| 494 | } |
| 495 | |
| 496 | /** |
| 497 | * Adds a person to a group referred to by name. |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 498 | * |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 499 | * @param resolver the resolver to use |
| 500 | * @param personId the person to add to the group |
| 501 | * @param groupName the name of the group to add the contact to |
| 502 | * @return the URI of the group membership row |
| 503 | * @throws IllegalStateException if the group can't be found |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 504 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 505 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 506 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 507 | public static Uri addToGroup(ContentResolver resolver, long personId, String groupName) { |
| 508 | long groupId = 0; |
| 509 | Cursor groupsCursor = resolver.query(Groups.CONTENT_URI, GROUPS_PROJECTION, |
| 510 | Groups.NAME + "=?", new String[] { groupName }, null); |
| 511 | if (groupsCursor != null) { |
| 512 | try { |
| 513 | if (groupsCursor.moveToFirst()) { |
| 514 | groupId = groupsCursor.getLong(0); |
| 515 | } |
| 516 | } finally { |
| 517 | groupsCursor.close(); |
| 518 | } |
| 519 | } |
| 520 | |
| 521 | if (groupId == 0) { |
| 522 | throw new IllegalStateException("Failed to find the My Contacts group"); |
| 523 | } |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 524 | |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 525 | return addToGroup(resolver, personId, groupId); |
| 526 | } |
| 527 | |
| 528 | /** |
| 529 | * Adds a person to a group. |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 530 | * |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 531 | * @param resolver the resolver to use |
| 532 | * @param personId the person to add to the group |
| 533 | * @param groupId the group to add the person to |
| 534 | * @return the URI of the group membership row |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 535 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 536 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 537 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 538 | public static Uri addToGroup(ContentResolver resolver, long personId, long groupId) { |
| 539 | ContentValues values = new ContentValues(); |
| 540 | values.put(GroupMembership.PERSON_ID, personId); |
| 541 | values.put(GroupMembership.GROUP_ID, groupId); |
| 542 | return resolver.insert(GroupMembership.CONTENT_URI, values); |
| 543 | } |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 544 | |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 545 | private static final String[] GROUPS_PROJECTION = new String[] { |
| 546 | Groups._ID, |
| 547 | }; |
| 548 | |
| 549 | /** |
| 550 | * Creates a new contacts and adds it to the "My Contacts" group. |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 551 | * |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 552 | * @param resolver the ContentResolver to use |
| 553 | * @param values the values to use when creating the contact |
| 554 | * @return the URI of the contact, or null if the operation fails |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 555 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 556 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 557 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 558 | public static Uri createPersonInMyContactsGroup(ContentResolver resolver, |
| 559 | ContentValues values) { |
| 560 | |
| 561 | Uri contactUri = resolver.insert(People.CONTENT_URI, values); |
| 562 | if (contactUri == null) { |
| 563 | Log.e(TAG, "Failed to create the contact"); |
| 564 | return null; |
| 565 | } |
| 566 | |
| 567 | if (addToMyContactsGroup(resolver, ContentUris.parseId(contactUri)) == null) { |
| 568 | resolver.delete(contactUri, null, null); |
| 569 | return null; |
| 570 | } |
| 571 | return contactUri; |
| 572 | } |
| 573 | |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 574 | /** |
| 575 | * @deprecated see {@link android.provider.ContactsContract} |
| 576 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 577 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 578 | public static Cursor queryGroups(ContentResolver resolver, long person) { |
| 579 | return resolver.query(GroupMembership.CONTENT_URI, null, "person=?", |
| 580 | new String[]{String.valueOf(person)}, Groups.DEFAULT_SORT_ORDER); |
| 581 | } |
| 582 | |
| 583 | /** |
| 584 | * Set the photo for this person. data may be null |
| 585 | * @param cr the ContentResolver to use |
| 586 | * @param person the Uri of the person whose photo is to be updated |
| 587 | * @param data the byte[] that represents the photo |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 588 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 589 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 590 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 591 | public static void setPhotoData(ContentResolver cr, Uri person, byte[] data) { |
| 592 | Uri photoUri = Uri.withAppendedPath(person, Contacts.Photos.CONTENT_DIRECTORY); |
| 593 | ContentValues values = new ContentValues(); |
| 594 | values.put(Photos.DATA, data); |
| 595 | cr.update(photoUri, values, null, null); |
| 596 | } |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 597 | |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 598 | /** |
| 599 | * Opens an InputStream for the person's photo and returns the photo as a Bitmap. |
| 600 | * If the person's photo isn't present returns the placeholderImageResource instead. |
| 601 | * @param person the person whose photo should be used |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 602 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 603 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 604 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 605 | public static InputStream openContactPhotoInputStream(ContentResolver cr, Uri person) { |
| 606 | Uri photoUri = Uri.withAppendedPath(person, Contacts.Photos.CONTENT_DIRECTORY); |
| 607 | Cursor cursor = cr.query(photoUri, new String[]{Photos.DATA}, null, null, null); |
| 608 | try { |
Jeff Hamilton | 8d570b3 | 2009-09-17 11:51:32 -0500 | [diff] [blame] | 609 | if (cursor == null || !cursor.moveToNext()) { |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 610 | return null; |
| 611 | } |
| 612 | byte[] data = cursor.getBlob(0); |
| 613 | if (data == null) { |
| 614 | return null; |
| 615 | } |
| 616 | return new ByteArrayInputStream(data); |
| 617 | } finally { |
Jeff Sharkey | 42fc2c6 | 2009-09-15 13:50:31 -0700 | [diff] [blame] | 618 | if (cursor != null) cursor.close(); |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 619 | } |
| 620 | } |
| 621 | |
| 622 | /** |
| 623 | * Opens an InputStream for the person's photo and returns the photo as a Bitmap. |
| 624 | * If the person's photo isn't present returns the placeholderImageResource instead. |
| 625 | * @param context the Context |
| 626 | * @param person the person whose photo should be used |
| 627 | * @param placeholderImageResource the image resource to use if the person doesn't |
| 628 | * have a photo |
| 629 | * @param options the decoding options, can be set to null |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 630 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 631 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 632 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 633 | public static Bitmap loadContactPhoto(Context context, Uri person, |
| 634 | int placeholderImageResource, BitmapFactory.Options options) { |
| 635 | if (person == null) { |
| 636 | return loadPlaceholderPhoto(placeholderImageResource, context, options); |
| 637 | } |
| 638 | |
| 639 | InputStream stream = openContactPhotoInputStream(context.getContentResolver(), person); |
| 640 | Bitmap bm = stream != null ? BitmapFactory.decodeStream(stream, null, options) : null; |
| 641 | if (bm == null) { |
| 642 | bm = loadPlaceholderPhoto(placeholderImageResource, context, options); |
| 643 | } |
| 644 | return bm; |
| 645 | } |
| 646 | |
| 647 | private static Bitmap loadPlaceholderPhoto(int placeholderImageResource, Context context, |
| 648 | BitmapFactory.Options options) { |
| 649 | if (placeholderImageResource == 0) { |
| 650 | return null; |
| 651 | } |
| 652 | return BitmapFactory.decodeResource(context.getResources(), |
| 653 | placeholderImageResource, options); |
| 654 | } |
| 655 | |
| 656 | /** |
| 657 | * A sub directory of a single person that contains all of their Phones. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 658 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 659 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 660 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 661 | public static final class Phones implements BaseColumns, PhonesColumns, |
| 662 | PeopleColumns { |
| 663 | /** |
| 664 | * no public constructor since this is a utility class |
| 665 | */ |
| 666 | private Phones() {} |
| 667 | |
| 668 | /** |
| 669 | * The directory twig for this sub-table |
Dianne Hackborn | 29e4a3c | 2009-09-30 22:35:40 -0700 | [diff] [blame] | 670 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 671 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 672 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 673 | public static final String CONTENT_DIRECTORY = "phones"; |
| 674 | |
| 675 | /** |
| 676 | * The default sort order for this table |
Dianne Hackborn | 29e4a3c | 2009-09-30 22:35:40 -0700 | [diff] [blame] | 677 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 678 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 679 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 680 | public static final String DEFAULT_SORT_ORDER = "number ASC"; |
| 681 | } |
| 682 | |
| 683 | /** |
| 684 | * A subdirectory of a single person that contains all of their |
| 685 | * ContactMethods. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 686 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 687 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 688 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 689 | public static final class ContactMethods |
| 690 | implements BaseColumns, ContactMethodsColumns, PeopleColumns { |
| 691 | /** |
| 692 | * no public constructor since this is a utility class |
| 693 | */ |
| 694 | private ContactMethods() {} |
| 695 | |
| 696 | /** |
| 697 | * The directory twig for this sub-table |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 698 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 699 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 700 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 701 | public static final String CONTENT_DIRECTORY = "contact_methods"; |
| 702 | |
| 703 | /** |
| 704 | * The default sort order for this table |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 705 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 706 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 707 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 708 | public static final String DEFAULT_SORT_ORDER = "data ASC"; |
| 709 | } |
| 710 | |
| 711 | /** |
| 712 | * The extensions for a person |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 713 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 714 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 715 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 716 | public static class Extensions implements BaseColumns, ExtensionsColumns { |
| 717 | /** |
| 718 | * no public constructor since this is a utility class |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 719 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 720 | */ |
| 721 | private Extensions() {} |
| 722 | |
| 723 | /** |
| 724 | * The directory twig for this sub-table |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 725 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 726 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 727 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 728 | public static final String CONTENT_DIRECTORY = "extensions"; |
| 729 | |
| 730 | /** |
| 731 | * The default sort order for this table |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 732 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 733 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 734 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 735 | public static final String DEFAULT_SORT_ORDER = "name ASC"; |
| 736 | |
| 737 | /** |
| 738 | * The ID of the person this phone number is assigned to. |
| 739 | * <P>Type: INTEGER (long)</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 740 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 741 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 742 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 743 | public static final String PERSON_ID = "person"; |
| 744 | } |
| 745 | } |
| 746 | |
| 747 | /** |
| 748 | * Columns from the groups table. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 749 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 750 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 751 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 752 | public interface GroupsColumns { |
| 753 | /** |
| 754 | * The group name. |
| 755 | * <P>Type: TEXT</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 756 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 757 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 758 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 759 | public static final String NAME = "name"; |
| 760 | |
| 761 | /** |
| 762 | * Notes about the group. |
| 763 | * <P>Type: TEXT</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 764 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 765 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 766 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 767 | public static final String NOTES = "notes"; |
| 768 | |
| 769 | /** |
| 770 | * Whether this group should be synced if the SYNC_EVERYTHING settings is false |
| 771 | * for this group's account. |
| 772 | * <P>Type: INTEGER (boolean)</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 773 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 774 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 775 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 776 | public static final String SHOULD_SYNC = "should_sync"; |
| 777 | |
| 778 | /** |
| 779 | * The ID of this group if it is a System Group, null otherwise. |
| 780 | * <P>Type: TEXT</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 781 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 782 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 783 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 784 | public static final String SYSTEM_ID = "system_id"; |
| 785 | } |
| 786 | |
| 787 | /** |
| 788 | * This table contains the groups for an account. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 789 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 790 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 791 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 792 | public static final class Groups |
| 793 | implements BaseColumns, SyncConstValue, GroupsColumns { |
| 794 | /** |
| 795 | * no public constructor since this is a utility class |
| 796 | */ |
| 797 | private Groups() {} |
| 798 | |
| 799 | /** |
| 800 | * The content:// style URL for this table |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 801 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 802 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 803 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 804 | public static final Uri CONTENT_URI = |
| 805 | Uri.parse("content://contacts/groups"); |
| 806 | |
| 807 | /** |
| 808 | * The content:// style URL for the table that holds the deleted |
| 809 | * groups. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 810 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 811 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 812 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 813 | public static final Uri DELETED_CONTENT_URI = |
| 814 | Uri.parse("content://contacts/deleted_groups"); |
| 815 | |
| 816 | /** |
| 817 | * The MIME type of {@link #CONTENT_URI} providing a directory of |
| 818 | * groups. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 819 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 820 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 821 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 822 | public static final String CONTENT_TYPE = "vnd.android.cursor.dir/contactsgroup"; |
| 823 | |
| 824 | /** |
| 825 | * The MIME type of a {@link #CONTENT_URI} subdirectory of a single |
| 826 | * group. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 827 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 828 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 829 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 830 | public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/contactsgroup"; |
| 831 | |
| 832 | /** |
| 833 | * The default sort order for this table |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 834 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 835 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 836 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 837 | public static final String DEFAULT_SORT_ORDER = NAME + " ASC"; |
| 838 | |
| 839 | /** |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 840 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 841 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 842 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 843 | public static final String GROUP_ANDROID_STARRED = "Starred in Android"; |
| 844 | |
| 845 | /** |
| 846 | * The "My Contacts" system group. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 847 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 848 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 849 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 850 | public static final String GROUP_MY_CONTACTS = "Contacts"; |
| 851 | } |
| 852 | |
| 853 | /** |
| 854 | * Columns from the Phones table that other columns join into themselves. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 855 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 856 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 857 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 858 | public interface PhonesColumns { |
| 859 | /** |
| 860 | * The type of the the phone number. |
| 861 | * <P>Type: INTEGER (one of the constants below)</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 862 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 863 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 864 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 865 | public static final String TYPE = "type"; |
| 866 | |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 867 | /** |
| 868 | * @deprecated see {@link android.provider.ContactsContract} |
| 869 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 870 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 871 | public static final int TYPE_CUSTOM = 0; |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 872 | /** |
| 873 | * @deprecated see {@link android.provider.ContactsContract} |
| 874 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 875 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 876 | public static final int TYPE_HOME = 1; |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 877 | /** |
| 878 | * @deprecated see {@link android.provider.ContactsContract} |
| 879 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 880 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 881 | public static final int TYPE_MOBILE = 2; |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 882 | /** |
| 883 | * @deprecated see {@link android.provider.ContactsContract} |
| 884 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 885 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 886 | public static final int TYPE_WORK = 3; |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 887 | /** |
| 888 | * @deprecated see {@link android.provider.ContactsContract} |
| 889 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 890 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 891 | public static final int TYPE_FAX_WORK = 4; |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 892 | /** |
| 893 | * @deprecated see {@link android.provider.ContactsContract} |
| 894 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 895 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 896 | public static final int TYPE_FAX_HOME = 5; |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 897 | /** |
| 898 | * @deprecated see {@link android.provider.ContactsContract} |
| 899 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 900 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 901 | public static final int TYPE_PAGER = 6; |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 902 | /** |
| 903 | * @deprecated see {@link android.provider.ContactsContract} |
| 904 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 905 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 906 | public static final int TYPE_OTHER = 7; |
| 907 | |
| 908 | /** |
| 909 | * The user provided label for the phone number, only used if TYPE is TYPE_CUSTOM. |
| 910 | * <P>Type: TEXT</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 911 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 912 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 913 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 914 | public static final String LABEL = "label"; |
| 915 | |
| 916 | /** |
| 917 | * The phone number as the user entered it. |
| 918 | * <P>Type: TEXT</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 919 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 920 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 921 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 922 | public static final String NUMBER = "number"; |
| 923 | |
| 924 | /** |
| 925 | * The normalized phone number |
| 926 | * <P>Type: TEXT</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 927 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 928 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 929 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 930 | public static final String NUMBER_KEY = "number_key"; |
| 931 | |
| 932 | /** |
| 933 | * Whether this is the primary phone number |
| 934 | * <P>Type: INTEGER (if set, non-0 means true)</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 935 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 936 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 937 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 938 | public static final String ISPRIMARY = "isprimary"; |
| 939 | } |
| 940 | |
| 941 | /** |
| 942 | * This table stores phone numbers and a reference to the person that the |
| 943 | * contact method belongs to. Phone numbers are stored separately from |
| 944 | * other contact methods to make caller ID lookup more efficient. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 945 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 946 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 947 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 948 | public static final class Phones |
| 949 | implements BaseColumns, PhonesColumns, PeopleColumns { |
| 950 | /** |
| 951 | * no public constructor since this is a utility class |
| 952 | */ |
| 953 | private Phones() {} |
| 954 | |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 955 | /** |
| 956 | * @deprecated see {@link android.provider.ContactsContract} |
| 957 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 958 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 959 | public static final CharSequence getDisplayLabel(Context context, int type, |
| 960 | CharSequence label, CharSequence[] labelArray) { |
| 961 | CharSequence display = ""; |
| 962 | |
| 963 | if (type != People.Phones.TYPE_CUSTOM) { |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 964 | CharSequence[] labels = labelArray != null? labelArray |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 965 | : context.getResources().getTextArray( |
| 966 | com.android.internal.R.array.phoneTypes); |
| 967 | try { |
| 968 | display = labels[type - 1]; |
| 969 | } catch (ArrayIndexOutOfBoundsException e) { |
| 970 | display = labels[People.Phones.TYPE_HOME - 1]; |
| 971 | } |
| 972 | } else { |
| 973 | if (!TextUtils.isEmpty(label)) { |
| 974 | display = label; |
| 975 | } |
| 976 | } |
| 977 | return display; |
| 978 | } |
| 979 | |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 980 | /** |
| 981 | * @deprecated see {@link android.provider.ContactsContract} |
| 982 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 983 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 984 | public static final CharSequence getDisplayLabel(Context context, int type, |
| 985 | CharSequence label) { |
| 986 | return getDisplayLabel(context, type, label, null); |
| 987 | } |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 988 | |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 989 | /** |
| 990 | * The content:// style URL for this table |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 991 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 992 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 993 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 994 | public static final Uri CONTENT_URI = |
| 995 | Uri.parse("content://contacts/phones"); |
| 996 | |
| 997 | /** |
| 998 | * The content:// style URL for filtering phone numbers |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 999 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1000 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1001 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1002 | public static final Uri CONTENT_FILTER_URL = |
| 1003 | Uri.parse("content://contacts/phones/filter"); |
| 1004 | |
| 1005 | /** |
| 1006 | * The MIME type of {@link #CONTENT_URI} providing a directory of |
| 1007 | * phones. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1008 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1009 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1010 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1011 | public static final String CONTENT_TYPE = "vnd.android.cursor.dir/phone"; |
| 1012 | |
| 1013 | /** |
| 1014 | * The MIME type of a {@link #CONTENT_URI} subdirectory of a single |
| 1015 | * phone. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1016 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1017 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1018 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1019 | public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/phone"; |
| 1020 | |
| 1021 | /** |
| 1022 | * The default sort order for this table |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1023 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1024 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1025 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1026 | public static final String DEFAULT_SORT_ORDER = "name ASC"; |
| 1027 | |
| 1028 | /** |
| 1029 | * The ID of the person this phone number is assigned to. |
| 1030 | * <P>Type: INTEGER (long)</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1031 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1032 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1033 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1034 | public static final String PERSON_ID = "person"; |
| 1035 | } |
| 1036 | |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1037 | /** |
| 1038 | * @deprecated see {@link android.provider.ContactsContract} |
| 1039 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1040 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1041 | public static final class GroupMembership implements BaseColumns, GroupsColumns { |
| 1042 | /** |
| 1043 | * no public constructor since this is a utility class |
| 1044 | */ |
| 1045 | private GroupMembership() {} |
| 1046 | |
| 1047 | /** |
| 1048 | * The content:// style URL for this table |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1049 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1050 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1051 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1052 | public static final Uri CONTENT_URI = |
| 1053 | Uri.parse("content://contacts/groupmembership"); |
| 1054 | |
| 1055 | /** |
| 1056 | * The content:// style URL for this table |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1057 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1058 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1059 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1060 | public static final Uri RAW_CONTENT_URI = |
| 1061 | Uri.parse("content://contacts/groupmembershipraw"); |
| 1062 | |
| 1063 | /** |
| 1064 | * The directory twig for this sub-table |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1065 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1066 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1067 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1068 | public static final String CONTENT_DIRECTORY = "groupmembership"; |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1069 | |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1070 | /** |
| 1071 | * The MIME type of {@link #CONTENT_URI} providing a directory of all |
| 1072 | * person groups. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1073 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1074 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1075 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1076 | public static final String CONTENT_TYPE = "vnd.android.cursor.dir/contactsgroupmembership"; |
| 1077 | |
| 1078 | /** |
| 1079 | * The MIME type of a {@link #CONTENT_URI} subdirectory of a single |
| 1080 | * person group. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1081 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1082 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1083 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1084 | public static final String CONTENT_ITEM_TYPE = |
| 1085 | "vnd.android.cursor.item/contactsgroupmembership"; |
| 1086 | |
| 1087 | /** |
| 1088 | * The default sort order for this table |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1089 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1090 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1091 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1092 | public static final String DEFAULT_SORT_ORDER = "group_id ASC"; |
| 1093 | |
| 1094 | /** |
| 1095 | * The row id of the accounts group. |
| 1096 | * <P>Type: TEXT</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1097 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1098 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1099 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1100 | public static final String GROUP_ID = "group_id"; |
| 1101 | |
| 1102 | /** |
| 1103 | * The sync id of the group. |
| 1104 | * <P>Type: TEXT</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1105 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1106 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1107 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1108 | public static final String GROUP_SYNC_ID = "group_sync_id"; |
| 1109 | |
| 1110 | /** |
| 1111 | * The account of the group. |
| 1112 | * <P>Type: TEXT</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1113 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1114 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1115 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1116 | public static final String GROUP_SYNC_ACCOUNT = "group_sync_account"; |
| 1117 | |
| 1118 | /** |
Fred Quintana | d9d2f11 | 2009-04-23 13:36:27 -0700 | [diff] [blame] | 1119 | * The account type of the group. |
| 1120 | * <P>Type: TEXT</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1121 | * @deprecated see {@link android.provider.ContactsContract} |
Fred Quintana | d9d2f11 | 2009-04-23 13:36:27 -0700 | [diff] [blame] | 1122 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1123 | @Deprecated |
Fred Quintana | d9d2f11 | 2009-04-23 13:36:27 -0700 | [diff] [blame] | 1124 | public static final String GROUP_SYNC_ACCOUNT_TYPE = "group_sync_account_type"; |
| 1125 | |
| 1126 | /** |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1127 | * The row id of the person. |
| 1128 | * <P>Type: TEXT</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1129 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1130 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1131 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1132 | public static final String PERSON_ID = "person"; |
| 1133 | } |
| 1134 | |
| 1135 | /** |
| 1136 | * Columns from the ContactMethods table that other tables join into |
| 1137 | * themseleves. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1138 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1139 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1140 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1141 | public interface ContactMethodsColumns { |
| 1142 | /** |
| 1143 | * The kind of the the contact method. For example, email address, |
| 1144 | * postal address, etc. |
| 1145 | * <P>Type: INTEGER (one of the values below)</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1146 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1147 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1148 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1149 | public static final String KIND = "kind"; |
| 1150 | |
| 1151 | /** |
| 1152 | * The type of the contact method, must be one of the types below. |
| 1153 | * <P>Type: INTEGER (one of the values below)</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1154 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1155 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1156 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1157 | public static final String TYPE = "type"; |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1158 | /** |
| 1159 | * @deprecated see {@link android.provider.ContactsContract} |
| 1160 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1161 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1162 | public static final int TYPE_CUSTOM = 0; |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1163 | /** |
| 1164 | * @deprecated see {@link android.provider.ContactsContract} |
| 1165 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1166 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1167 | public static final int TYPE_HOME = 1; |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1168 | /** |
| 1169 | * @deprecated see {@link android.provider.ContactsContract} |
| 1170 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1171 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1172 | public static final int TYPE_WORK = 2; |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1173 | /** |
| 1174 | * @deprecated see {@link android.provider.ContactsContract} |
| 1175 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1176 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1177 | public static final int TYPE_OTHER = 3; |
| 1178 | |
| 1179 | /** |
Daisuke Miyakawa | 7c3e18c5 | 2009-05-19 23:13:14 +0900 | [diff] [blame] | 1180 | * @hide This is temporal. TYPE_MOBILE should be added to TYPE in the future. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1181 | * @deprecated see {@link android.provider.ContactsContract} |
Daisuke Miyakawa | 7c3e18c5 | 2009-05-19 23:13:14 +0900 | [diff] [blame] | 1182 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1183 | @Deprecated |
Daisuke Miyakawa | 7c3e18c5 | 2009-05-19 23:13:14 +0900 | [diff] [blame] | 1184 | public static final int MOBILE_EMAIL_TYPE_INDEX = 2; |
| 1185 | |
| 1186 | /** |
| 1187 | * @hide This is temporal. TYPE_MOBILE should be added to TYPE in the future. |
| 1188 | * This is not "mobile" but "CELL" since vCard uses it for identifying mobile phone. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1189 | * @deprecated see {@link android.provider.ContactsContract} |
Daisuke Miyakawa | 7c3e18c5 | 2009-05-19 23:13:14 +0900 | [diff] [blame] | 1190 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1191 | @Deprecated |
Daisuke Miyakawa | 7c3e18c5 | 2009-05-19 23:13:14 +0900 | [diff] [blame] | 1192 | public static final String MOBILE_EMAIL_TYPE_NAME = "_AUTO_CELL"; |
| 1193 | |
| 1194 | /** |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1195 | * The user defined label for the the contact method. |
| 1196 | * <P>Type: TEXT</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1197 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1198 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1199 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1200 | public static final String LABEL = "label"; |
| 1201 | |
| 1202 | /** |
| 1203 | * The data for the contact method. |
| 1204 | * <P>Type: TEXT</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1205 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1206 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1207 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1208 | public static final String DATA = "data"; |
| 1209 | |
| 1210 | /** |
| 1211 | * Auxiliary data for the contact method. |
| 1212 | * <P>Type: TEXT</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1213 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1214 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1215 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1216 | public static final String AUX_DATA = "aux_data"; |
| 1217 | |
| 1218 | /** |
| 1219 | * Whether this is the primary organization |
| 1220 | * <P>Type: INTEGER (if set, non-0 means true)</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1221 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1222 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1223 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1224 | public static final String ISPRIMARY = "isprimary"; |
| 1225 | } |
| 1226 | |
| 1227 | /** |
| 1228 | * This table stores all non-phone contact methods and a reference to the |
| 1229 | * person that the contact method belongs to. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1230 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1231 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1232 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1233 | public static final class ContactMethods |
| 1234 | implements BaseColumns, ContactMethodsColumns, PeopleColumns { |
| 1235 | /** |
| 1236 | * The column with latitude data for postal locations |
| 1237 | * <P>Type: REAL</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1238 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1239 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1240 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1241 | public static final String POSTAL_LOCATION_LATITUDE = DATA; |
| 1242 | |
| 1243 | /** |
| 1244 | * The column with longitude data for postal locations |
| 1245 | * <P>Type: REAL</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1246 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1247 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1248 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1249 | public static final String POSTAL_LOCATION_LONGITUDE = AUX_DATA; |
| 1250 | |
| 1251 | /** |
| 1252 | * The predefined IM protocol types. The protocol can either be non-present, one |
| 1253 | * of these types, or a free-form string. These cases are encoded in the AUX_DATA |
| 1254 | * column as: |
| 1255 | * - null |
| 1256 | * - pre:<an integer, one of the protocols below> |
| 1257 | * - custom:<a string> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1258 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1259 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1260 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1261 | public static final int PROTOCOL_AIM = 0; |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1262 | /** |
| 1263 | * @deprecated see {@link android.provider.ContactsContract} |
| 1264 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1265 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1266 | public static final int PROTOCOL_MSN = 1; |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1267 | /** |
| 1268 | * @deprecated see {@link android.provider.ContactsContract} |
| 1269 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1270 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1271 | public static final int PROTOCOL_YAHOO = 2; |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1272 | /** |
| 1273 | * @deprecated see {@link android.provider.ContactsContract} |
| 1274 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1275 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1276 | public static final int PROTOCOL_SKYPE = 3; |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1277 | /** |
| 1278 | * @deprecated see {@link android.provider.ContactsContract} |
| 1279 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1280 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1281 | public static final int PROTOCOL_QQ = 4; |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1282 | /** |
| 1283 | * @deprecated see {@link android.provider.ContactsContract} |
| 1284 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1285 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1286 | public static final int PROTOCOL_GOOGLE_TALK = 5; |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1287 | /** |
| 1288 | * @deprecated see {@link android.provider.ContactsContract} |
| 1289 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1290 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1291 | public static final int PROTOCOL_ICQ = 6; |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1292 | /** |
| 1293 | * @deprecated see {@link android.provider.ContactsContract} |
| 1294 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1295 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1296 | public static final int PROTOCOL_JABBER = 7; |
| 1297 | |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1298 | /** |
| 1299 | * @deprecated see {@link android.provider.ContactsContract} |
| 1300 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1301 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1302 | public static String encodePredefinedImProtocol(int protocol) { |
| 1303 | return "pre:" + protocol; |
| 1304 | } |
| 1305 | |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1306 | /** |
| 1307 | * @deprecated see {@link android.provider.ContactsContract} |
| 1308 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1309 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1310 | public static String encodeCustomImProtocol(String protocolString) { |
| 1311 | return "custom:" + protocolString; |
| 1312 | } |
| 1313 | |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1314 | /** |
| 1315 | * @deprecated see {@link android.provider.ContactsContract} |
| 1316 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1317 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1318 | public static Object decodeImProtocol(String encodedString) { |
| 1319 | if (encodedString == null) { |
| 1320 | return null; |
| 1321 | } |
| 1322 | |
| 1323 | if (encodedString.startsWith("pre:")) { |
| 1324 | return Integer.parseInt(encodedString.substring(4)); |
| 1325 | } |
| 1326 | |
| 1327 | if (encodedString.startsWith("custom:")) { |
| 1328 | return encodedString.substring(7); |
| 1329 | } |
| 1330 | |
| 1331 | throw new IllegalArgumentException( |
| 1332 | "the value is not a valid encoded protocol, " + encodedString); |
| 1333 | } |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 1334 | |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1335 | /** |
Jeff Hamilton | f3960b1 | 2009-11-20 20:04:03 -0800 | [diff] [blame] | 1336 | * TODO find a place to put the canonical version of these. |
| 1337 | */ |
| 1338 | interface ProviderNames { |
| 1339 | // |
| 1340 | //NOTE: update Contacts.java with new providers when they're added. |
| 1341 | // |
| 1342 | String YAHOO = "Yahoo"; |
| 1343 | String GTALK = "GTalk"; |
| 1344 | String MSN = "MSN"; |
| 1345 | String ICQ = "ICQ"; |
| 1346 | String AIM = "AIM"; |
| 1347 | String XMPP = "XMPP"; |
| 1348 | String JABBER = "JABBER"; |
| 1349 | String SKYPE = "SKYPE"; |
| 1350 | String QQ = "QQ"; |
| 1351 | } |
| 1352 | |
| 1353 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1354 | * This looks up the provider name defined in |
Jeff Hamilton | f3960b1 | 2009-11-20 20:04:03 -0800 | [diff] [blame] | 1355 | * from the predefined IM protocol id. |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1356 | * This is used for interacting with the IM application. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1357 | * |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1358 | * @param protocol the protocol ID |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1359 | * @return the provider name the IM app uses for the given protocol, or null if no |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1360 | * provider is defined for the given protocol |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1361 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1362 | * @hide |
| 1363 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1364 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1365 | public static String lookupProviderNameFromId(int protocol) { |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1366 | switch (protocol) { |
| 1367 | case PROTOCOL_GOOGLE_TALK: |
Jeff Hamilton | f3960b1 | 2009-11-20 20:04:03 -0800 | [diff] [blame] | 1368 | return ProviderNames.GTALK; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1369 | case PROTOCOL_AIM: |
Jeff Hamilton | f3960b1 | 2009-11-20 20:04:03 -0800 | [diff] [blame] | 1370 | return ProviderNames.AIM; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1371 | case PROTOCOL_MSN: |
Jeff Hamilton | f3960b1 | 2009-11-20 20:04:03 -0800 | [diff] [blame] | 1372 | return ProviderNames.MSN; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1373 | case PROTOCOL_YAHOO: |
Jeff Hamilton | f3960b1 | 2009-11-20 20:04:03 -0800 | [diff] [blame] | 1374 | return ProviderNames.YAHOO; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1375 | case PROTOCOL_ICQ: |
Jeff Hamilton | f3960b1 | 2009-11-20 20:04:03 -0800 | [diff] [blame] | 1376 | return ProviderNames.ICQ; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1377 | case PROTOCOL_JABBER: |
Jeff Hamilton | f3960b1 | 2009-11-20 20:04:03 -0800 | [diff] [blame] | 1378 | return ProviderNames.JABBER; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1379 | case PROTOCOL_SKYPE: |
Jeff Hamilton | f3960b1 | 2009-11-20 20:04:03 -0800 | [diff] [blame] | 1380 | return ProviderNames.SKYPE; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1381 | case PROTOCOL_QQ: |
Jeff Hamilton | f3960b1 | 2009-11-20 20:04:03 -0800 | [diff] [blame] | 1382 | return ProviderNames.QQ; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1383 | } |
| 1384 | return null; |
| 1385 | } |
| 1386 | |
| 1387 | /** |
| 1388 | * no public constructor since this is a utility class |
| 1389 | */ |
| 1390 | private ContactMethods() {} |
| 1391 | |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1392 | /** |
| 1393 | * @deprecated see {@link android.provider.ContactsContract} |
| 1394 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1395 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1396 | public static final CharSequence getDisplayLabel(Context context, int kind, |
| 1397 | int type, CharSequence label) { |
| 1398 | CharSequence display = ""; |
| 1399 | switch (kind) { |
| 1400 | case KIND_EMAIL: { |
| 1401 | if (type != People.ContactMethods.TYPE_CUSTOM) { |
| 1402 | CharSequence[] labels = context.getResources().getTextArray( |
| 1403 | com.android.internal.R.array.emailAddressTypes); |
| 1404 | try { |
| 1405 | display = labels[type - 1]; |
| 1406 | } catch (ArrayIndexOutOfBoundsException e) { |
| 1407 | display = labels[ContactMethods.TYPE_HOME - 1]; |
| 1408 | } |
| 1409 | } else { |
| 1410 | if (!TextUtils.isEmpty(label)) { |
| 1411 | display = label; |
| 1412 | } |
| 1413 | } |
| 1414 | break; |
| 1415 | } |
| 1416 | |
| 1417 | case KIND_POSTAL: { |
| 1418 | if (type != People.ContactMethods.TYPE_CUSTOM) { |
| 1419 | CharSequence[] labels = context.getResources().getTextArray( |
| 1420 | com.android.internal.R.array.postalAddressTypes); |
| 1421 | try { |
| 1422 | display = labels[type - 1]; |
| 1423 | } catch (ArrayIndexOutOfBoundsException e) { |
| 1424 | display = labels[ContactMethods.TYPE_HOME - 1]; |
| 1425 | } |
| 1426 | } else { |
| 1427 | if (!TextUtils.isEmpty(label)) { |
| 1428 | display = label; |
| 1429 | } |
| 1430 | } |
| 1431 | break; |
| 1432 | } |
| 1433 | |
| 1434 | default: |
| 1435 | display = context.getString(R.string.untitled); |
| 1436 | } |
| 1437 | return display; |
| 1438 | } |
| 1439 | |
| 1440 | /** |
| 1441 | * Add a longitude and latitude location to a postal address. |
| 1442 | * |
| 1443 | * @param context the context to use when updating the database |
| 1444 | * @param postalId the address to update |
| 1445 | * @param latitude the latitude for the address |
| 1446 | * @param longitude the longitude for the address |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1447 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1448 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1449 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1450 | public void addPostalLocation(Context context, long postalId, |
| 1451 | double latitude, double longitude) { |
| 1452 | final ContentResolver resolver = context.getContentResolver(); |
| 1453 | // Insert the location |
| 1454 | ContentValues values = new ContentValues(2); |
| 1455 | values.put(POSTAL_LOCATION_LATITUDE, latitude); |
| 1456 | values.put(POSTAL_LOCATION_LONGITUDE, longitude); |
| 1457 | Uri loc = resolver.insert(CONTENT_URI, values); |
| 1458 | long locId = ContentUris.parseId(loc); |
| 1459 | |
| 1460 | // Update the postal address |
| 1461 | values.clear(); |
| 1462 | values.put(AUX_DATA, locId); |
| 1463 | resolver.update(ContentUris.withAppendedId(CONTENT_URI, postalId), values, null, null); |
| 1464 | } |
| 1465 | |
| 1466 | /** |
| 1467 | * The content:// style URL for this table |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1468 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1469 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1470 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1471 | public static final Uri CONTENT_URI = |
| 1472 | Uri.parse("content://contacts/contact_methods"); |
| 1473 | |
| 1474 | /** |
| 1475 | * The content:// style URL for sub-directory of e-mail addresses. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1476 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1477 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1478 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1479 | public static final Uri CONTENT_EMAIL_URI = |
| 1480 | Uri.parse("content://contacts/contact_methods/email"); |
| 1481 | |
| 1482 | /** |
| 1483 | * The MIME type of {@link #CONTENT_URI} providing a directory of |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1484 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1485 | * phones. |
| 1486 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1487 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1488 | public static final String CONTENT_TYPE = "vnd.android.cursor.dir/contact-methods"; |
| 1489 | |
| 1490 | /** |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1491 | * The MIME type of a {@link #CONTENT_EMAIL_URI} sub-directory of |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1492 | * multiple {@link Contacts#KIND_EMAIL} entries. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1493 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1494 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1495 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1496 | public static final String CONTENT_EMAIL_TYPE = "vnd.android.cursor.dir/email"; |
| 1497 | |
| 1498 | /** |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1499 | * The MIME type of a {@link #CONTENT_EMAIL_URI} sub-directory of |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1500 | * multiple {@link Contacts#KIND_POSTAL} entries. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1501 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1502 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1503 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1504 | public static final String CONTENT_POSTAL_TYPE = "vnd.android.cursor.dir/postal-address"; |
| 1505 | |
| 1506 | /** |
| 1507 | * The MIME type of a {@link #CONTENT_URI} sub-directory of a single |
| 1508 | * {@link Contacts#KIND_EMAIL} entry. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1509 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1510 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1511 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1512 | public static final String CONTENT_EMAIL_ITEM_TYPE = "vnd.android.cursor.item/email"; |
| 1513 | |
| 1514 | /** |
| 1515 | * The MIME type of a {@link #CONTENT_URI} sub-directory of a single |
| 1516 | * {@link Contacts#KIND_POSTAL} entry. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1517 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1518 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1519 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1520 | public static final String CONTENT_POSTAL_ITEM_TYPE |
| 1521 | = "vnd.android.cursor.item/postal-address"; |
| 1522 | |
| 1523 | /** |
| 1524 | * The MIME type of a {@link #CONTENT_URI} sub-directory of a single |
| 1525 | * {@link Contacts#KIND_IM} entry. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1526 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1527 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1528 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1529 | public static final String CONTENT_IM_ITEM_TYPE = "vnd.android.cursor.item/jabber-im"; |
| 1530 | |
| 1531 | /** |
| 1532 | * The default sort order for this table |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1533 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1534 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1535 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1536 | public static final String DEFAULT_SORT_ORDER = "name ASC"; |
| 1537 | |
| 1538 | /** |
| 1539 | * The ID of the person this contact method is assigned to. |
| 1540 | * <P>Type: INTEGER (long)</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1541 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1542 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1543 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1544 | public static final String PERSON_ID = "person"; |
| 1545 | } |
| 1546 | |
| 1547 | /** |
| 1548 | * The IM presence columns with some contacts specific columns mixed in. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1549 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1550 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1551 | @Deprecated |
Jeff Hamilton | f3960b1 | 2009-11-20 20:04:03 -0800 | [diff] [blame] | 1552 | public interface PresenceColumns { |
| 1553 | /** |
| 1554 | * The priority, an integer, used by XMPP presence |
| 1555 | * <P>Type: INTEGER</P> |
| 1556 | */ |
| 1557 | String PRIORITY = "priority"; |
| 1558 | |
| 1559 | /** |
| 1560 | * The server defined status. |
| 1561 | * <P>Type: INTEGER (one of the values below)</P> |
| 1562 | */ |
| 1563 | String PRESENCE_STATUS = ContactsContract.StatusUpdates.PRESENCE; |
| 1564 | |
| 1565 | /** |
| 1566 | * Presence Status definition |
| 1567 | */ |
| 1568 | int OFFLINE = ContactsContract.StatusUpdates.OFFLINE; |
| 1569 | int INVISIBLE = ContactsContract.StatusUpdates.INVISIBLE; |
| 1570 | int AWAY = ContactsContract.StatusUpdates.AWAY; |
| 1571 | int IDLE = ContactsContract.StatusUpdates.IDLE; |
| 1572 | int DO_NOT_DISTURB = ContactsContract.StatusUpdates.DO_NOT_DISTURB; |
| 1573 | int AVAILABLE = ContactsContract.StatusUpdates.AVAILABLE; |
| 1574 | |
| 1575 | /** |
| 1576 | * The user defined status line. |
| 1577 | * <P>Type: TEXT</P> |
| 1578 | */ |
| 1579 | String PRESENCE_CUSTOM_STATUS = ContactsContract.StatusUpdates.STATUS; |
| 1580 | |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1581 | /** |
| 1582 | * The IM service the presence is coming from. Formatted using either |
| 1583 | * {@link Contacts.ContactMethods#encodePredefinedImProtocol} or |
| 1584 | * {@link Contacts.ContactMethods#encodeCustomImProtocol}. |
| 1585 | * <P>Type: STRING</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1586 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1587 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1588 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1589 | public static final String IM_PROTOCOL = "im_protocol"; |
| 1590 | |
| 1591 | /** |
| 1592 | * The IM handle the presence item is for. The handle is scoped to |
| 1593 | * the {@link #IM_PROTOCOL}. |
| 1594 | * <P>Type: STRING</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1595 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1596 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1597 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1598 | public static final String IM_HANDLE = "im_handle"; |
| 1599 | |
| 1600 | /** |
| 1601 | * The IM account for the local user that the presence data came from. |
| 1602 | * <P>Type: STRING</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1603 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1604 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1605 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1606 | public static final String IM_ACCOUNT = "im_account"; |
| 1607 | } |
| 1608 | |
| 1609 | /** |
| 1610 | * Contains presence information about contacts. |
| 1611 | * @hide |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1612 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1613 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1614 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1615 | public static final class Presence |
| 1616 | implements BaseColumns, PresenceColumns, PeopleColumns { |
| 1617 | /** |
| 1618 | * The content:// style URL for this table |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1619 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1620 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1621 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1622 | public static final Uri CONTENT_URI = |
| 1623 | Uri.parse("content://contacts/presence"); |
| 1624 | |
| 1625 | /** |
| 1626 | * The ID of the person this presence item is assigned to. |
| 1627 | * <P>Type: INTEGER (long)</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1628 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1629 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1630 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1631 | public static final String PERSON_ID = "person"; |
| 1632 | |
| 1633 | /** |
| 1634 | * Gets the resource ID for the proper presence icon. |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 1635 | * |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1636 | * @param status the status to get the icon for |
| 1637 | * @return the resource ID for the proper presence icon |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1638 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1639 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1640 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1641 | public static final int getPresenceIconResourceId(int status) { |
| 1642 | switch (status) { |
| 1643 | case Contacts.People.AVAILABLE: |
| 1644 | return com.android.internal.R.drawable.presence_online; |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 1645 | |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1646 | case Contacts.People.IDLE: |
| 1647 | case Contacts.People.AWAY: |
| 1648 | return com.android.internal.R.drawable.presence_away; |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 1649 | |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1650 | case Contacts.People.DO_NOT_DISTURB: |
| 1651 | return com.android.internal.R.drawable.presence_busy; |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 1652 | |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1653 | case Contacts.People.INVISIBLE: |
| 1654 | return com.android.internal.R.drawable.presence_invisible; |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 1655 | |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1656 | case Contacts.People.OFFLINE: |
| 1657 | default: |
| 1658 | return com.android.internal.R.drawable.presence_offline; |
| 1659 | } |
| 1660 | } |
| 1661 | |
| 1662 | /** |
| 1663 | * Sets a presence icon to the proper graphic |
| 1664 | * |
| 1665 | * @param icon the icon to to set |
| 1666 | * @param serverStatus that status |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1667 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1668 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1669 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1670 | public static final void setPresenceIcon(ImageView icon, int serverStatus) { |
| 1671 | icon.setImageResource(getPresenceIconResourceId(serverStatus)); |
| 1672 | } |
| 1673 | } |
| 1674 | |
| 1675 | /** |
| 1676 | * Columns from the Organizations table that other columns join into themselves. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1677 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1678 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1679 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1680 | public interface OrganizationColumns { |
| 1681 | /** |
Evan JIANG | ae49995 | 2008-11-02 09:47:52 +0800 | [diff] [blame] | 1682 | * The type of the organizations. |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1683 | * <P>Type: INTEGER (one of the constants below)</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1684 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1685 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1686 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1687 | public static final String TYPE = "type"; |
| 1688 | |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1689 | /** |
| 1690 | * @deprecated see {@link android.provider.ContactsContract} |
| 1691 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1692 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1693 | public static final int TYPE_CUSTOM = 0; |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1694 | /** |
| 1695 | * @deprecated see {@link android.provider.ContactsContract} |
| 1696 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1697 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1698 | public static final int TYPE_WORK = 1; |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1699 | /** |
| 1700 | * @deprecated see {@link android.provider.ContactsContract} |
| 1701 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1702 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1703 | public static final int TYPE_OTHER = 2; |
| 1704 | |
| 1705 | /** |
| 1706 | * The user provided label, only used if TYPE is TYPE_CUSTOM. |
| 1707 | * <P>Type: TEXT</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1708 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1709 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1710 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1711 | public static final String LABEL = "label"; |
| 1712 | |
| 1713 | /** |
| 1714 | * The name of the company for this organization. |
| 1715 | * <P>Type: TEXT</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1716 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1717 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1718 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1719 | public static final String COMPANY = "company"; |
| 1720 | |
| 1721 | /** |
| 1722 | * The title within this organization. |
| 1723 | * <P>Type: TEXT</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1724 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1725 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1726 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1727 | public static final String TITLE = "title"; |
| 1728 | |
| 1729 | /** |
| 1730 | * The person this organization is tied to. |
| 1731 | * <P>Type: TEXT</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1732 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1733 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1734 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1735 | public static final String PERSON_ID = "person"; |
| 1736 | |
| 1737 | /** |
| 1738 | * Whether this is the primary organization |
| 1739 | * <P>Type: INTEGER (if set, non-0 means true)</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1740 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1741 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1742 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1743 | public static final String ISPRIMARY = "isprimary"; |
| 1744 | } |
| 1745 | |
| 1746 | /** |
| 1747 | * A sub directory of a single person that contains all of their Phones. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1748 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1749 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1750 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1751 | public static final class Organizations implements BaseColumns, OrganizationColumns { |
| 1752 | /** |
| 1753 | * no public constructor since this is a utility class |
| 1754 | */ |
| 1755 | private Organizations() {} |
| 1756 | |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1757 | /** |
| 1758 | * @deprecated see {@link android.provider.ContactsContract} |
| 1759 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1760 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1761 | public static final CharSequence getDisplayLabel(Context context, int type, |
| 1762 | CharSequence label) { |
| 1763 | CharSequence display = ""; |
| 1764 | |
| 1765 | if (type != TYPE_CUSTOM) { |
| 1766 | CharSequence[] labels = context.getResources().getTextArray( |
| 1767 | com.android.internal.R.array.organizationTypes); |
| 1768 | try { |
| 1769 | display = labels[type - 1]; |
| 1770 | } catch (ArrayIndexOutOfBoundsException e) { |
Evan JIANG | ae49995 | 2008-11-02 09:47:52 +0800 | [diff] [blame] | 1771 | display = labels[Organizations.TYPE_WORK - 1]; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1772 | } |
| 1773 | } else { |
| 1774 | if (!TextUtils.isEmpty(label)) { |
| 1775 | display = label; |
| 1776 | } |
| 1777 | } |
| 1778 | return display; |
| 1779 | } |
| 1780 | |
| 1781 | /** |
| 1782 | * The content:// style URL for this table |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1783 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1784 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1785 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1786 | public static final Uri CONTENT_URI = |
| 1787 | Uri.parse("content://contacts/organizations"); |
| 1788 | |
| 1789 | /** |
| 1790 | * The directory twig for this sub-table |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1791 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1792 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1793 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1794 | public static final String CONTENT_DIRECTORY = "organizations"; |
| 1795 | |
| 1796 | /** |
| 1797 | * The default sort order for this table |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1798 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1799 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1800 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1801 | public static final String DEFAULT_SORT_ORDER = "company, title, isprimary ASC"; |
| 1802 | } |
| 1803 | |
| 1804 | /** |
| 1805 | * Columns from the Photos table that other columns join into themselves. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1806 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1807 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1808 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1809 | public interface PhotosColumns { |
| 1810 | /** |
| 1811 | * The _SYNC_VERSION of the photo that was last downloaded |
| 1812 | * <P>Type: TEXT</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1813 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1814 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1815 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1816 | public static final String LOCAL_VERSION = "local_version"; |
| 1817 | |
| 1818 | /** |
| 1819 | * The person this photo is associated with. |
| 1820 | * <P>Type: TEXT</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1821 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1822 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1823 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1824 | public static final String PERSON_ID = "person"; |
| 1825 | |
| 1826 | /** |
| 1827 | * non-zero if a download is required and the photo isn't marked as a bad resource. |
| 1828 | * You must specify this in the columns in order to use it in the where clause. |
| 1829 | * <P>Type: INTEGER(boolean)</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1830 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1831 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1832 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1833 | public static final String DOWNLOAD_REQUIRED = "download_required"; |
| 1834 | |
| 1835 | /** |
| 1836 | * non-zero if this photo is known to exist on the server |
| 1837 | * <P>Type: INTEGER(boolean)</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1838 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1839 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1840 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1841 | public static final String EXISTS_ON_SERVER = "exists_on_server"; |
| 1842 | |
| 1843 | /** |
| 1844 | * Contains the description of the upload or download error from |
| 1845 | * the previous attempt. If null then the previous attempt succeeded. |
| 1846 | * <P>Type: TEXT</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1847 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1848 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1849 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1850 | public static final String SYNC_ERROR = "sync_error"; |
| 1851 | |
| 1852 | /** |
| 1853 | * The image data, or null if there is no image. |
| 1854 | * <P>Type: BLOB</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1855 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1856 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1857 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1858 | public static final String DATA = "data"; |
| 1859 | |
| 1860 | } |
| 1861 | |
| 1862 | /** |
| 1863 | * The photos over all of the people |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1864 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1865 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1866 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1867 | public static final class Photos implements BaseColumns, PhotosColumns, SyncConstValue { |
| 1868 | /** |
| 1869 | * no public constructor since this is a utility class |
| 1870 | */ |
| 1871 | private Photos() {} |
| 1872 | |
| 1873 | /** |
| 1874 | * The content:// style URL for this table |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1875 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1876 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1877 | @Deprecated |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1878 | public static final Uri CONTENT_URI = Uri.parse("content://contacts/photos"); |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1879 | |
| 1880 | /** |
| 1881 | * The directory twig for this sub-table |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1882 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1883 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1884 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1885 | public static final String CONTENT_DIRECTORY = "photo"; |
| 1886 | |
| 1887 | /** |
| 1888 | * The default sort order for this table |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1889 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1890 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1891 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1892 | public static final String DEFAULT_SORT_ORDER = "person ASC"; |
| 1893 | } |
| 1894 | |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1895 | /** |
| 1896 | * @deprecated see {@link android.provider.ContactsContract} |
| 1897 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1898 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1899 | public interface ExtensionsColumns { |
| 1900 | /** |
| 1901 | * The name of this extension. May not be null. There may be at most one row for each name. |
| 1902 | * <P>Type: TEXT</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1903 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1904 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1905 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1906 | public static final String NAME = "name"; |
| 1907 | |
| 1908 | /** |
| 1909 | * The value of this extension. May not be null. |
| 1910 | * <P>Type: TEXT</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1911 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1912 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1913 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1914 | public static final String VALUE = "value"; |
| 1915 | } |
| 1916 | |
| 1917 | /** |
| 1918 | * The extensions for a person |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1919 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1920 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1921 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1922 | public static final class Extensions implements BaseColumns, ExtensionsColumns { |
| 1923 | /** |
| 1924 | * no public constructor since this is a utility class |
| 1925 | */ |
| 1926 | private Extensions() {} |
| 1927 | |
| 1928 | /** |
| 1929 | * The content:// style URL for this table |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1930 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1931 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1932 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1933 | public static final Uri CONTENT_URI = |
| 1934 | Uri.parse("content://contacts/extensions"); |
| 1935 | |
| 1936 | /** |
| 1937 | * The MIME type of {@link #CONTENT_URI} providing a directory of |
| 1938 | * phones. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1939 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1940 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1941 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1942 | public static final String CONTENT_TYPE = "vnd.android.cursor.dir/contact_extensions"; |
| 1943 | |
| 1944 | /** |
| 1945 | * The MIME type of a {@link #CONTENT_URI} subdirectory of a single |
| 1946 | * phone. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1947 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1948 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1949 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1950 | public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/contact_extensions"; |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1951 | |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1952 | /** |
| 1953 | * The default sort order for this table |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1954 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1955 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1956 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1957 | public static final String DEFAULT_SORT_ORDER = "person, name ASC"; |
| 1958 | |
| 1959 | /** |
| 1960 | * The ID of the person this phone number is assigned to. |
| 1961 | * <P>Type: INTEGER (long)</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1962 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1963 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1964 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1965 | public static final String PERSON_ID = "person"; |
| 1966 | } |
| 1967 | |
| 1968 | /** |
| 1969 | * Contains helper classes used to create or manage {@link android.content.Intent Intents} |
| 1970 | * that involve contacts. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1971 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1972 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1973 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1974 | public static final class Intents { |
Dianne Hackborn | 29e4a3c | 2009-09-30 22:35:40 -0700 | [diff] [blame] | 1975 | /** |
| 1976 | * @deprecated see {@link android.provider.ContactsContract} |
| 1977 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1978 | @Deprecated |
| 1979 | public Intents() { |
| 1980 | } |
| 1981 | |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1982 | /** |
| 1983 | * This is the intent that is fired when a search suggestion is clicked on. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1984 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1985 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1986 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1987 | public static final String SEARCH_SUGGESTION_CLICKED = |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 1988 | ContactsContract.Intents.SEARCH_SUGGESTION_CLICKED; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1989 | |
| 1990 | /** |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 1991 | * This is the intent that is fired when a search suggestion for dialing a number |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1992 | * is clicked on. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 1993 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1994 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 1995 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1996 | public static final String SEARCH_SUGGESTION_DIAL_NUMBER_CLICKED = |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 1997 | ContactsContract.Intents.SEARCH_SUGGESTION_DIAL_NUMBER_CLICKED; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1998 | |
| 1999 | /** |
| 2000 | * This is the intent that is fired when a search suggestion for creating a contact |
| 2001 | * is clicked on. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2002 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2003 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2004 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2005 | public static final String SEARCH_SUGGESTION_CREATE_CONTACT_CLICKED = |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2006 | ContactsContract.Intents.SEARCH_SUGGESTION_CREATE_CONTACT_CLICKED; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2007 | |
| 2008 | /** |
| 2009 | * Starts an Activity that lets the user pick a contact to attach an image to. |
| 2010 | * After picking the contact it launches the image cropper in face detection mode. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2011 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2012 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2013 | @Deprecated |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2014 | public static final String ATTACH_IMAGE = ContactsContract.Intents.ATTACH_IMAGE; |
The Android Open Source Project | c39a6e0 | 2009-03-11 12:11:56 -0700 | [diff] [blame] | 2015 | |
| 2016 | /** |
| 2017 | * Takes as input a data URI with a mailto: or tel: scheme. If a single |
| 2018 | * contact exists with the given data it will be shown. If no contact |
| 2019 | * exists, a dialog will ask the user if they want to create a new |
| 2020 | * contact with the provided details filled in. If multiple contacts |
| 2021 | * share the data the user will be prompted to pick which contact they |
| 2022 | * want to view. |
| 2023 | * <p> |
| 2024 | * For <code>mailto:</code> URIs, the scheme specific portion must be a |
| 2025 | * raw email address, such as one built using |
| 2026 | * {@link Uri#fromParts(String, String, String)}. |
| 2027 | * <p> |
| 2028 | * For <code>tel:</code> URIs, the scheme specific portion is compared |
| 2029 | * to existing numbers using the standard caller ID lookup algorithm. |
| 2030 | * The number must be properly encoded, for example using |
| 2031 | * {@link Uri#fromParts(String, String, String)}. |
| 2032 | * <p> |
| 2033 | * Any extras from the {@link Insert} class will be passed along to the |
| 2034 | * create activity if there are no contacts to show. |
| 2035 | * <p> |
| 2036 | * Passing true for the {@link #EXTRA_FORCE_CREATE} extra will skip |
| 2037 | * prompting the user when the contact doesn't exist. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2038 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | c39a6e0 | 2009-03-11 12:11:56 -0700 | [diff] [blame] | 2039 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2040 | @Deprecated |
The Android Open Source Project | c39a6e0 | 2009-03-11 12:11:56 -0700 | [diff] [blame] | 2041 | public static final String SHOW_OR_CREATE_CONTACT = |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2042 | ContactsContract.Intents.SHOW_OR_CREATE_CONTACT; |
The Android Open Source Project | c39a6e0 | 2009-03-11 12:11:56 -0700 | [diff] [blame] | 2043 | |
| 2044 | /** |
The Android Open Source Project | 1059253 | 2009-03-18 17:39:46 -0700 | [diff] [blame] | 2045 | * Used with {@link #SHOW_OR_CREATE_CONTACT} to force creating a new |
| 2046 | * contact if no matching contact found. Otherwise, default behavior is |
| 2047 | * to prompt user with dialog before creating. |
| 2048 | * <p> |
| 2049 | * Type: BOOLEAN |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2050 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | c39a6e0 | 2009-03-11 12:11:56 -0700 | [diff] [blame] | 2051 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2052 | @Deprecated |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2053 | public static final String EXTRA_FORCE_CREATE = ContactsContract.Intents.EXTRA_FORCE_CREATE; |
| 2054 | |
The Android Open Source Project | 1059253 | 2009-03-18 17:39:46 -0700 | [diff] [blame] | 2055 | /** |
| 2056 | * Used with {@link #SHOW_OR_CREATE_CONTACT} to specify an exact |
| 2057 | * description to be shown when prompting user about creating a new |
| 2058 | * contact. |
| 2059 | * <p> |
| 2060 | * Type: STRING |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2061 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 1059253 | 2009-03-18 17:39:46 -0700 | [diff] [blame] | 2062 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2063 | @Deprecated |
The Android Open Source Project | 1059253 | 2009-03-18 17:39:46 -0700 | [diff] [blame] | 2064 | public static final String EXTRA_CREATE_DESCRIPTION = |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2065 | ContactsContract.Intents.EXTRA_CREATE_DESCRIPTION; |
The Android Open Source Project | c39a6e0 | 2009-03-11 12:11:56 -0700 | [diff] [blame] | 2066 | |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2067 | /** |
Jeff Sharkey | 1132200 | 2009-06-04 17:25:51 -0700 | [diff] [blame] | 2068 | * Optional extra used with {@link #SHOW_OR_CREATE_CONTACT} to specify a |
| 2069 | * dialog location using screen coordinates. When not specified, the |
| 2070 | * dialog will be centered. |
| 2071 | * |
| 2072 | * @hide pending API council review |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2073 | * @deprecated see {@link android.provider.ContactsContract} |
Jeff Sharkey | 1132200 | 2009-06-04 17:25:51 -0700 | [diff] [blame] | 2074 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2075 | @Deprecated |
Jeff Sharkey | 1132200 | 2009-06-04 17:25:51 -0700 | [diff] [blame] | 2076 | public static final String EXTRA_TARGET_RECT = ContactsContract.Intents.EXTRA_TARGET_RECT; |
| 2077 | |
| 2078 | /** |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2079 | * Intents related to the Contacts app UI. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2080 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2081 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2082 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2083 | public static final class UI { |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2084 | /** |
| 2085 | * @deprecated see {@link android.provider.ContactsContract} |
| 2086 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2087 | @Deprecated |
| 2088 | public UI() { |
| 2089 | } |
| 2090 | |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2091 | /** |
| 2092 | * The action for the default contacts list tab. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2093 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2094 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2095 | @Deprecated |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2096 | public static final String LIST_DEFAULT = ContactsContract.Intents.UI.LIST_DEFAULT; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2097 | |
| 2098 | /** |
| 2099 | * The action for the contacts list tab. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2100 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2101 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2102 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2103 | public static final String LIST_GROUP_ACTION = |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2104 | ContactsContract.Intents.UI.LIST_GROUP_ACTION; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2105 | |
| 2106 | /** |
| 2107 | * When in LIST_GROUP_ACTION mode, this is the group to display. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2108 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2109 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2110 | @Deprecated |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2111 | public static final String GROUP_NAME_EXTRA_KEY = |
| 2112 | ContactsContract.Intents.UI.GROUP_NAME_EXTRA_KEY; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2113 | /** |
| 2114 | * The action for the all contacts list tab. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2115 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2116 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2117 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2118 | public static final String LIST_ALL_CONTACTS_ACTION = |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2119 | ContactsContract.Intents.UI.LIST_ALL_CONTACTS_ACTION; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2120 | |
| 2121 | /** |
| 2122 | * The action for the contacts with phone numbers list tab. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2123 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2124 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2125 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2126 | public static final String LIST_CONTACTS_WITH_PHONES_ACTION = |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2127 | ContactsContract.Intents.UI.LIST_CONTACTS_WITH_PHONES_ACTION; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2128 | |
| 2129 | /** |
| 2130 | * The action for the starred contacts list tab. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2131 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2132 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2133 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2134 | public static final String LIST_STARRED_ACTION = |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2135 | ContactsContract.Intents.UI.LIST_STARRED_ACTION; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2136 | |
| 2137 | /** |
| 2138 | * The action for the frequent contacts list tab. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2139 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2140 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2141 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2142 | public static final String LIST_FREQUENT_ACTION = |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2143 | ContactsContract.Intents.UI.LIST_FREQUENT_ACTION; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2144 | |
| 2145 | /** |
| 2146 | * The action for the "strequent" contacts list tab. It first lists the starred |
| 2147 | * contacts in alphabetical order and then the frequent contacts in descending |
| 2148 | * order of the number of times they have been contacted. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2149 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2150 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2151 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2152 | public static final String LIST_STREQUENT_ACTION = |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2153 | ContactsContract.Intents.UI.LIST_STREQUENT_ACTION; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2154 | |
| 2155 | /** |
| 2156 | * A key for to be used as an intent extra to set the activity |
| 2157 | * title to a custom String value. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2158 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2159 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2160 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2161 | public static final String TITLE_EXTRA_KEY = |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2162 | ContactsContract.Intents.UI.TITLE_EXTRA_KEY; |
| 2163 | |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2164 | /** |
| 2165 | * Activity Action: Display a filtered list of contacts |
| 2166 | * <p> |
| 2167 | * Input: Extra field {@link #FILTER_TEXT_EXTRA_KEY} is the text to use for |
| 2168 | * filtering |
| 2169 | * <p> |
| 2170 | * Output: Nothing. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2171 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2172 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2173 | @Deprecated |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2174 | public static final String FILTER_CONTACTS_ACTION = |
| 2175 | ContactsContract.Intents.UI.FILTER_CONTACTS_ACTION; |
| 2176 | |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2177 | /** |
| 2178 | * Used as an int extra field in {@link #FILTER_CONTACTS_ACTION} |
| 2179 | * intents to supply the text on which to filter. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2180 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2181 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2182 | @Deprecated |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2183 | public static final String FILTER_TEXT_EXTRA_KEY = |
| 2184 | ContactsContract.Intents.UI.FILTER_TEXT_EXTRA_KEY; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2185 | } |
| 2186 | |
| 2187 | /** |
| 2188 | * Convenience class that contains string constants used |
| 2189 | * to create contact {@link android.content.Intent Intents}. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2190 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2191 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2192 | @Deprecated |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2193 | public static final class Insert { |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2194 | /** |
| 2195 | * @deprecated see {@link android.provider.ContactsContract} |
| 2196 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2197 | @Deprecated |
| 2198 | public Insert() { |
| 2199 | } |
| 2200 | |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2201 | /** The action code to use when adding a contact |
| 2202 | * @deprecated see {@link android.provider.ContactsContract} |
| 2203 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2204 | @Deprecated |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2205 | public static final String ACTION = ContactsContract.Intents.Insert.ACTION; |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2206 | |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2207 | /** |
| 2208 | * If present, forces a bypass of quick insert mode. |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2209 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2210 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2211 | @Deprecated |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2212 | public static final String FULL_MODE = ContactsContract.Intents.Insert.FULL_MODE; |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2213 | |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2214 | /** |
| 2215 | * The extra field for the contact name. |
| 2216 | * <P>Type: String</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2217 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2218 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2219 | @Deprecated |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2220 | public static final String NAME = ContactsContract.Intents.Insert.NAME; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2221 | |
| 2222 | /** |
The Android Open Source Project | b798689 | 2009-01-09 17:51:23 -0800 | [diff] [blame] | 2223 | * The extra field for the contact phonetic name. |
| 2224 | * <P>Type: String</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2225 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | b798689 | 2009-01-09 17:51:23 -0800 | [diff] [blame] | 2226 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2227 | @Deprecated |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2228 | public static final String PHONETIC_NAME = |
| 2229 | ContactsContract.Intents.Insert.PHONETIC_NAME; |
The Android Open Source Project | b798689 | 2009-01-09 17:51:23 -0800 | [diff] [blame] | 2230 | |
| 2231 | /** |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2232 | * The extra field for the contact company. |
| 2233 | * <P>Type: String</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2234 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2235 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2236 | @Deprecated |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2237 | public static final String COMPANY = ContactsContract.Intents.Insert.COMPANY; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2238 | |
| 2239 | /** |
| 2240 | * The extra field for the contact job title. |
| 2241 | * <P>Type: String</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2242 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2243 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2244 | @Deprecated |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2245 | public static final String JOB_TITLE = ContactsContract.Intents.Insert.JOB_TITLE; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2246 | |
| 2247 | /** |
| 2248 | * The extra field for the contact notes. |
| 2249 | * <P>Type: String</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2250 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2251 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2252 | @Deprecated |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2253 | public static final String NOTES = ContactsContract.Intents.Insert.NOTES; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2254 | |
| 2255 | /** |
| 2256 | * The extra field for the contact phone number. |
| 2257 | * <P>Type: String</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2258 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2259 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2260 | @Deprecated |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2261 | public static final String PHONE = ContactsContract.Intents.Insert.PHONE; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2262 | |
| 2263 | /** |
| 2264 | * The extra field for the contact phone number type. |
| 2265 | * <P>Type: Either an integer value from {@link android.provider.Contacts.PhonesColumns PhonesColumns}, |
The Android Open Source Project | b798689 | 2009-01-09 17:51:23 -0800 | [diff] [blame] | 2266 | * or a string specifying a custom label.</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2267 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2268 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2269 | @Deprecated |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2270 | public static final String PHONE_TYPE = ContactsContract.Intents.Insert.PHONE_TYPE; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2271 | |
| 2272 | /** |
| 2273 | * The extra field for the phone isprimary flag. |
| 2274 | * <P>Type: boolean</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2275 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2276 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2277 | @Deprecated |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2278 | public static final String PHONE_ISPRIMARY = |
| 2279 | ContactsContract.Intents.Insert.PHONE_ISPRIMARY; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2280 | |
| 2281 | /** |
The Android Open Source Project | f013e1a | 2008-12-17 18:05:43 -0800 | [diff] [blame] | 2282 | * The extra field for an optional second contact phone number. |
| 2283 | * <P>Type: String</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2284 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | f013e1a | 2008-12-17 18:05:43 -0800 | [diff] [blame] | 2285 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2286 | @Deprecated |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2287 | public static final String SECONDARY_PHONE = |
| 2288 | ContactsContract.Intents.Insert.SECONDARY_PHONE; |
The Android Open Source Project | f013e1a | 2008-12-17 18:05:43 -0800 | [diff] [blame] | 2289 | |
| 2290 | /** |
| 2291 | * The extra field for an optional second contact phone number type. |
| 2292 | * <P>Type: Either an integer value from {@link android.provider.Contacts.PhonesColumns PhonesColumns}, |
The Android Open Source Project | b798689 | 2009-01-09 17:51:23 -0800 | [diff] [blame] | 2293 | * or a string specifying a custom label.</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2294 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | f013e1a | 2008-12-17 18:05:43 -0800 | [diff] [blame] | 2295 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2296 | @Deprecated |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2297 | public static final String SECONDARY_PHONE_TYPE = |
| 2298 | ContactsContract.Intents.Insert.SECONDARY_PHONE_TYPE; |
The Android Open Source Project | f013e1a | 2008-12-17 18:05:43 -0800 | [diff] [blame] | 2299 | |
| 2300 | /** |
| 2301 | * The extra field for an optional third contact phone number. |
| 2302 | * <P>Type: String</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2303 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | f013e1a | 2008-12-17 18:05:43 -0800 | [diff] [blame] | 2304 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2305 | @Deprecated |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2306 | public static final String TERTIARY_PHONE = |
| 2307 | ContactsContract.Intents.Insert.TERTIARY_PHONE; |
The Android Open Source Project | f013e1a | 2008-12-17 18:05:43 -0800 | [diff] [blame] | 2308 | |
| 2309 | /** |
| 2310 | * The extra field for an optional third contact phone number type. |
| 2311 | * <P>Type: Either an integer value from {@link android.provider.Contacts.PhonesColumns PhonesColumns}, |
The Android Open Source Project | b798689 | 2009-01-09 17:51:23 -0800 | [diff] [blame] | 2312 | * or a string specifying a custom label.</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2313 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | f013e1a | 2008-12-17 18:05:43 -0800 | [diff] [blame] | 2314 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2315 | @Deprecated |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2316 | public static final String TERTIARY_PHONE_TYPE = |
| 2317 | ContactsContract.Intents.Insert.TERTIARY_PHONE_TYPE; |
The Android Open Source Project | f013e1a | 2008-12-17 18:05:43 -0800 | [diff] [blame] | 2318 | |
| 2319 | /** |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2320 | * The extra field for the contact email address. |
| 2321 | * <P>Type: String</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2322 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2323 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2324 | @Deprecated |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2325 | public static final String EMAIL = ContactsContract.Intents.Insert.EMAIL; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2326 | |
| 2327 | /** |
| 2328 | * The extra field for the contact email type. |
| 2329 | * <P>Type: Either an integer value from {@link android.provider.Contacts.ContactMethodsColumns ContactMethodsColumns} |
The Android Open Source Project | b798689 | 2009-01-09 17:51:23 -0800 | [diff] [blame] | 2330 | * or a string specifying a custom label.</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2331 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2332 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2333 | @Deprecated |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2334 | public static final String EMAIL_TYPE = ContactsContract.Intents.Insert.EMAIL_TYPE; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2335 | |
| 2336 | /** |
| 2337 | * The extra field for the email isprimary flag. |
| 2338 | * <P>Type: boolean</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2339 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2340 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2341 | @Deprecated |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2342 | public static final String EMAIL_ISPRIMARY = |
| 2343 | ContactsContract.Intents.Insert.EMAIL_ISPRIMARY; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2344 | |
| 2345 | /** |
The Android Open Source Project | f013e1a | 2008-12-17 18:05:43 -0800 | [diff] [blame] | 2346 | * The extra field for an optional second contact email address. |
| 2347 | * <P>Type: String</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2348 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | f013e1a | 2008-12-17 18:05:43 -0800 | [diff] [blame] | 2349 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2350 | @Deprecated |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2351 | public static final String SECONDARY_EMAIL = |
| 2352 | ContactsContract.Intents.Insert.SECONDARY_EMAIL; |
The Android Open Source Project | f013e1a | 2008-12-17 18:05:43 -0800 | [diff] [blame] | 2353 | |
| 2354 | /** |
| 2355 | * The extra field for an optional second contact email type. |
| 2356 | * <P>Type: Either an integer value from {@link android.provider.Contacts.ContactMethodsColumns ContactMethodsColumns} |
The Android Open Source Project | b798689 | 2009-01-09 17:51:23 -0800 | [diff] [blame] | 2357 | * or a string specifying a custom label.</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2358 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | f013e1a | 2008-12-17 18:05:43 -0800 | [diff] [blame] | 2359 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2360 | @Deprecated |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2361 | public static final String SECONDARY_EMAIL_TYPE = |
| 2362 | ContactsContract.Intents.Insert.SECONDARY_EMAIL_TYPE; |
The Android Open Source Project | f013e1a | 2008-12-17 18:05:43 -0800 | [diff] [blame] | 2363 | |
| 2364 | /** |
| 2365 | * The extra field for an optional third contact email address. |
| 2366 | * <P>Type: String</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2367 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | f013e1a | 2008-12-17 18:05:43 -0800 | [diff] [blame] | 2368 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2369 | @Deprecated |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2370 | public static final String TERTIARY_EMAIL = |
| 2371 | ContactsContract.Intents.Insert.TERTIARY_EMAIL; |
The Android Open Source Project | f013e1a | 2008-12-17 18:05:43 -0800 | [diff] [blame] | 2372 | |
| 2373 | /** |
| 2374 | * The extra field for an optional third contact email type. |
| 2375 | * <P>Type: Either an integer value from {@link android.provider.Contacts.ContactMethodsColumns ContactMethodsColumns} |
The Android Open Source Project | b798689 | 2009-01-09 17:51:23 -0800 | [diff] [blame] | 2376 | * or a string specifying a custom label.</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2377 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | f013e1a | 2008-12-17 18:05:43 -0800 | [diff] [blame] | 2378 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2379 | @Deprecated |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2380 | public static final String TERTIARY_EMAIL_TYPE = |
| 2381 | ContactsContract.Intents.Insert.TERTIARY_EMAIL_TYPE; |
The Android Open Source Project | f013e1a | 2008-12-17 18:05:43 -0800 | [diff] [blame] | 2382 | |
| 2383 | /** |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2384 | * The extra field for the contact postal address. |
| 2385 | * <P>Type: String</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2386 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2387 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2388 | @Deprecated |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2389 | public static final String POSTAL = ContactsContract.Intents.Insert.POSTAL; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2390 | |
| 2391 | /** |
| 2392 | * The extra field for the contact postal address type. |
| 2393 | * <P>Type: Either an integer value from {@link android.provider.Contacts.ContactMethodsColumns ContactMethodsColumns} |
The Android Open Source Project | b798689 | 2009-01-09 17:51:23 -0800 | [diff] [blame] | 2394 | * or a string specifying a custom label.</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2395 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2396 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2397 | @Deprecated |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2398 | public static final String POSTAL_TYPE = ContactsContract.Intents.Insert.POSTAL_TYPE; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2399 | |
| 2400 | /** |
| 2401 | * The extra field for the postal isprimary flag. |
| 2402 | * <P>Type: boolean</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2403 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2404 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2405 | @Deprecated |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2406 | public static final String POSTAL_ISPRIMARY = ContactsContract.Intents.Insert.POSTAL_ISPRIMARY; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2407 | |
| 2408 | /** |
| 2409 | * The extra field for an IM handle. |
| 2410 | * <P>Type: String</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2411 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2412 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2413 | @Deprecated |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2414 | public static final String IM_HANDLE = ContactsContract.Intents.Insert.IM_HANDLE; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2415 | |
| 2416 | /** |
| 2417 | * The extra field for the IM protocol |
| 2418 | * <P>Type: the result of {@link Contacts.ContactMethods#encodePredefinedImProtocol} |
| 2419 | * or {@link Contacts.ContactMethods#encodeCustomImProtocol}.</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2420 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2421 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2422 | @Deprecated |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2423 | public static final String IM_PROTOCOL = ContactsContract.Intents.Insert.IM_PROTOCOL; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2424 | |
| 2425 | /** |
| 2426 | * The extra field for the IM isprimary flag. |
| 2427 | * <P>Type: boolean</P> |
Jeff Hamilton | f852698 | 2009-09-24 11:34:58 -0500 | [diff] [blame] | 2428 | * @deprecated see {@link android.provider.ContactsContract} |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2429 | */ |
Jeff Sharkey | 534aa01 | 2009-08-25 14:33:44 -0700 | [diff] [blame] | 2430 | @Deprecated |
Evan Millar | dc2da5f | 2009-06-18 16:07:13 -0700 | [diff] [blame] | 2431 | public static final String IM_ISPRIMARY = ContactsContract.Intents.Insert.IM_ISPRIMARY; |
The Android Open Source Project | 54b6cfa | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2432 | } |
| 2433 | } |
| 2434 | } |