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