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