/**@class android.provider.ContactsContract.DataUsageFeedback @extends java.lang.Object <p class="caution"><b>Caution: </b>As of January 7, 2019, this class is obsolete. For more information, see the <a href="/guide/topics/providers/contacts-provider#ObsoleteData">Contacts Provider</a> page. </p> <p> API allowing applications to send usage information for each {@link android.provider.ContactsContract.Data} row to the Contacts Provider. Applications can also clear all usage information. </p> <p> With the feedback, Contacts Provider may return more contextually appropriate results for Data listing, typically supplied with {@link android.provider.ContactsContract.Contacts#CONTENT_FILTER_URI}, {@link android.provider.ContactsContract.CommonDataKinds.Email#CONTENT_FILTER_URI}, {@link android.provider.ContactsContract.CommonDataKinds.Phone#CONTENT_FILTER_URI}, and users can benefit from better ranked (sorted) lists in applications that show auto-complete list. </p> <p> There is no guarantee for how this feedback is used, or even whether it is used at all. The ranking algorithm will make best efforts to use the feedback data, but the exact implementation, the storage data structures as well as the resulting sort order is device and version specific and can change over time. </p> <p> When updating usage information, users of this API need to use {@link ContentResolver#update(Uri, ContentValues, String, String[])} with a Uri constructed from {@link android.provider.ContactsContract.DataUsageFeedback#FEEDBACK_URI}. The Uri must contain one or more data id(s) as its last path. They also need to append a query parameter to the Uri, to specify the type of the communication, which enables the Contacts Provider to differentiate between kinds of interactions using the same contact data field (for example a phone number can be used to make phone calls or send SMS). </p> <p> Selection and selectionArgs are ignored and must be set to null. To get data ids, you may need to call {@link ContentResolver#query(Uri, String[], String, String[], String)} toward {@link android.provider.ContactsContract.Data#CONTENT_URI}. </p> <p> {@link ContentResolver#update(Uri, ContentValues, String, String[])} returns a positive integer when successful, and returns 0 if no contact with that id was found. </p> <p> Example: <pre> Uri uri = DataUsageFeedback.FEEDBACK_URI.buildUpon() .appendPath(TextUtils.join(",", dataIds)) .appendQueryParameter(DataUsageFeedback.USAGE_TYPE, DataUsageFeedback.USAGE_TYPE_CALL) .build(); boolean successful = resolver.update(uri, new ContentValues(), null, null) > 0; </pre> </p> <p> Applications can also clear all usage information with: <pre> boolean successful = resolver.delete(DataUsageFeedback.DELETE_USAGE_URI, null, null) > 0; </pre> </p> @deprecated Contacts affinity information is no longer supported as of Android version {@link android.os.Build.VERSION_CODES#Q}. Both update and delete calls are always ignored. */ var DataUsageFeedback = { /** The content:// style URI for sending usage feedback. Must be used with {@link ContentResolver#update(Uri, ContentValues, String, String[])}. */ FEEDBACK_URI : "null", /** The content:// style URI for deleting all usage information. Must be used with {@link ContentResolver#delete(Uri, String, String[])}. The {@code where} and {@code selectionArgs} parameters are ignored. */ DELETE_USAGE_URI : "null", /** <p> Name for query parameter specifying the type of data usage. </p> */ USAGE_TYPE : "type", /** <p> Type of usage for voice interaction, which includes phone call, voice chat, and video chat. </p> */ USAGE_TYPE_CALL : "call", /** <p> Type of usage for text interaction involving longer messages, which includes email. </p> */ USAGE_TYPE_LONG_TEXT : "long_text", /** <p> Type of usage for text interaction involving shorter messages, which includes SMS, text chat with email addresses. </p> */ USAGE_TYPE_SHORT_TEXT : "short_text", };