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