diff --git a/core/java/android/provider/CallLog.java b/core/java/android/provider/CallLog.java index fbd61cf3f4129..c7c6ceb5c16d5 100644 --- a/core/java/android/provider/CallLog.java +++ b/core/java/android/provider/CallLog.java @@ -284,8 +284,10 @@ public class CallLog { /** * The cached name associated with the phone number, if it exists. - * This value is not guaranteed to be current, if the contact information - * associated with this number has changed. + * + *
This value is typically filled in by the dialer app for the caching purpose, + * so it's not guaranteed to be present, and may not be current if the contact + * information associated with this number has changed. *
Type: TEXT
*/ public static final String CACHED_NAME = "name"; @@ -293,8 +295,10 @@ public class CallLog { /** * The cached number type (Home, Work, etc) associated with the * phone number, if it exists. - * This value is not guaranteed to be current, if the contact information - * associated with this number has changed. + * + *This value is typically filled in by the dialer app for the caching purpose, + * so it's not guaranteed to be present, and may not be current if the contact + * information associated with this number has changed. *
Type: INTEGER
*/ public static final String CACHED_NUMBER_TYPE = "numbertype"; @@ -302,8 +306,10 @@ public class CallLog { /** * The cached number label, for a custom number type, associated with the * phone number, if it exists. - * This value is not guaranteed to be current, if the contact information - * associated with this number has changed. + * + *This value is typically filled in by the dialer app for the caching purpose, + * so it's not guaranteed to be present, and may not be current if the contact + * information associated with this number has changed. *
Type: TEXT
*/ public static final String CACHED_NUMBER_LABEL = "numberlabel"; @@ -339,40 +345,50 @@ public class CallLog { /** * The cached URI to look up the contact associated with the phone number, if it exists. - * This value may not be current if the contact information associated with this number - * has changed. + * + *This value is typically filled in by the dialer app for the caching purpose, + * so it's not guaranteed to be present, and may not be current if the contact + * information associated with this number has changed. *
Type: TEXT
*/ public static final String CACHED_LOOKUP_URI = "lookup_uri"; /** * The cached phone number of the contact which matches this entry, if it exists. - * This value may not be current if the contact information associated with this number - * has changed. + * + *This value is typically filled in by the dialer app for the caching purpose, + * so it's not guaranteed to be present, and may not be current if the contact + * information associated with this number has changed. *
Type: TEXT
*/ public static final String CACHED_MATCHED_NUMBER = "matched_number"; /** * The cached normalized(E164) version of the phone number, if it exists. - * This value may not be current if the contact information associated with this number - * has changed. + * + *This value is typically filled in by the dialer app for the caching purpose, + * so it's not guaranteed to be present, and may not be current if the contact + * information associated with this number has changed. *
Type: TEXT
*/ public static final String CACHED_NORMALIZED_NUMBER = "normalized_number"; /** * The cached photo id of the picture associated with the phone number, if it exists. - * This value may not be current if the contact information associated with this number - * has changed. + * + *This value is typically filled in by the dialer app for the caching purpose, + * so it's not guaranteed to be present, and may not be current if the contact + * information associated with this number has changed. *
Type: INTEGER (long)
*/ public static final String CACHED_PHOTO_ID = "photo_id"; /** * The cached photo URI of the picture associated with the phone number, if it exists. - * This value may not be current if the contact information associated with this number - * has changed. + * + *This value is typically filled in by the dialer app for the caching purpose, + * so it's not guaranteed to be present, and may not be current if the contact + * information associated with this number has changed. *
Type: TEXT (URI)
*/ public static final String CACHED_PHOTO_URI = "photo_uri"; @@ -380,9 +396,10 @@ public class CallLog { /** * The cached phone number, formatted with formatting rules based on the country the * user was in when the call was made or received. - * This value is not guaranteed to be present, and may not be current if the contact - * information associated with this number - * has changed. + * + *This value is typically filled in by the dialer app for the caching purpose, + * so it's not guaranteed to be present, and may not be current if the contact + * information associated with this number has changed. *
Type: TEXT
*/ public static final String CACHED_FORMATTED_NUMBER = "formatted_number"; diff --git a/core/java/android/provider/ContactsContract.java b/core/java/android/provider/ContactsContract.java index c70304e140cff..c495e6c163ac6 100644 --- a/core/java/android/provider/ContactsContract.java +++ b/core/java/android/provider/ContactsContract.java @@ -35,6 +35,7 @@ import android.content.Intent; import android.content.res.AssetFileDescriptor; import android.content.res.Resources; import android.database.Cursor; +import android.database.CursorWrapper; import android.database.DatabaseUtils; import android.graphics.Rect; import android.net.Uri; @@ -138,8 +139,20 @@ public final class ContactsContract { public static final String DIRECTORY_PARAM_KEY = "directory"; /** - * A query parameter that limits the number of results returned. The + * A query parameter that limits the number of results returned for supported URIs. The * parameter value should be an integer. + * + *This parameter is not supported by all URIs. Supported URIs include, but not limited to, + * {@link Contacts#CONTENT_URI}, + * {@link RawContacts#CONTENT_URI}, + * {@link Data#CONTENT_URI}, + * {@link CommonDataKinds.Phone#CONTENT_URI}, + * {@link CommonDataKinds.Callable#CONTENT_URI}, + * {@link CommonDataKinds.Email#CONTENT_URI}, + * {@link CommonDataKinds.Contactables#CONTENT_URI}, + * + *
In order to limit the number of rows returned by a non-supported URI, you can implement a + * {@link CursorWrapper} and override the {@link CursorWrapper#getCount()} methods. */ public static final String LIMIT_PARAM_KEY = "limit"; @@ -437,6 +450,9 @@ public final class ContactsContract { /** * _ID of the default directory, which represents locally stored contacts. + * This is only supported by {@link ContactsContract.Contacts#CONTENT_URI} and + * {@link ContactsContract.Contacts#CONTENT_FILTER_URI}. + * Other URLs do not support the concept of "visible" or "invisible" contacts. */ public static final long DEFAULT = 0;